Body: <p>I just had some problems with an <a href="https://craftcms.stackexchange.com/questions/19848/locked-out-of-admin-panel-after-update/19851#19851">update exhausting my memory</a>. But I already had the PHP memory limit at 512 MB, and I had to take it up to 1024 MB! I know this is relative but, <strong>is this too much?</strong></p>
  
  <p>How can I know if this is within normal range or if I should be working to improve it?</p>
  
  <p>This is the site for a newspaper in a small province (~10 posts/day). After the latest update, the database is at ~600mb.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-04-08T14:53:42.623Z
Comments.Text: *"database is at ~600M"* – what do you mean with that? 600 million entries? 600 MB database dump, including template caches?
Comments.UserDisplayName: carlcs
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-04-08T14:57:56.690Z
Comments.Text: Sorry, I was still writing as if i was in my config file, I meant 600Mb. And that was the size of the database in my drive, a backup is at 250Mb. Just database. Not sure if that's an accurate way of measuring it... probably not now that I think about it.
Comments.UserDisplayName: cballenar
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-04-08T15:06:13.393Z
Comments.Text: You can export a backup using the tool in CP > Settings, which removes all template caches (which can be a lot). Should be a better indicator for size of your actual data. Another interesting figure is the amount of rows in `craft_elements`.
Comments.UserDisplayName: carlcs
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-04-08T15:31:05.373Z
Comments.Text: Gotcha! The 250Mb backup was done form the CP. The entries table is at 10,000 rows while the elements table is at 63,000 rows. Could this justify that much memory?
Comments.UserDisplayName: cballenar
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-04-08T18:14:37.393Z
Comments.Text: Oh wow... my server keeps crashing since I updated, it looks like 1Gb of memory isn't enough :| MySQL seems to be hogging most of it but I don't know what is doing to exhaust it. How can I troubleshoot this?
Comments.UserDisplayName: cballenar
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-04-09T14:29:13.217Z
Comments.Text: If you have a big database, you can set `backupDbOnUpdate => false` in your config file, which will eliminate the db backup step all together. Just make sure you do the backup manually before triggering the update in case you need to roll back. Also, if you're doing the update in an environment where `devMode => true`, PHP will require alot more memory that if you don't. Maybe it'd work if you can turn that off.
Comments.UserDisplayName: André Elvan
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-04-10T12:39:16.857Z
Comments.Text: @AndréElvan thanks for the suggestions. Turning off `backupDbOnUpdate` was the only way I was able to update my craft install; otherwise it was timing out and causing havoc. `devMode` is now off however the issues started before I had activated it.
Comments.UserDisplayName: cballenar
Tags: <performance><memory>
Title: PHP memory limit, is 1024 MB too much?
ThreadText: # PHP memory limit, is 1024 MB too much?
  
  (Asked by: username_0 on 2017-04-08)
  
  I just had some problems with an [update exhausting my memory](https://craftcms.stackexchange.com/questions/19848/locked-out-of-admin-panel-after-update/19851#19851). But I already had the PHP memory limit at 512 MB, and I had to take it up to 1024 MB! I know this is relative but, **is this too much?**
  
  How can I know if this is within normal range or if I should be working to improve it?
  
  This is the site for a newspaper in a small province (~10 posts/day). After the latest update, the database is at ~600mb.
  
  **Tags:** performance, memory
  
  > **Comments:**
  > **username_1**: *"database is at ~600M"* – what do you mean with that? 600 million entries? 600 MB database dump, including template caches?  
  > **username_0**: Sorry, I was still writing as if i was in my config file, I meant 600Mb. And that was the size of the database in my drive, a backup is at 250Mb. Just database. Not sure if that's an accurate way of measuring it... probably not now that I think about it.  
  > **username_1**: You can export a backup using the tool in CP > Settings, which removes all template caches (which can be a lot). Should be a better indicator for size of your actual data. Another interesting figure is the amount of rows in `craft_elements`.  
  > **username_0**: Gotcha! The 250Mb backup was done form the CP. The entries table is at 10,000 rows while the elements table is at 63,000 rows. Could this justify that much memory?  
  > **username_0**: Oh wow... my server keeps crashing since I updated, it looks like 1Gb of memory isn't enough :| MySQL seems to be hogging most of it but I don't know what is doing to exhaust it. How can I troubleshoot this?  
  > **username_2**: If you have a big database, you can set `backupDbOnUpdate => false` in your config file, which will eliminate the db backup step all together. Just make sure you do the backup manually before triggering the update in case you need to roll back. Also, if you're doing the update in an environment where `devMode => true`, PHP will require alot more memory that if you don't. Maybe it'd work if you can turn that off.  
  > **username_0**: @username_2 thanks for the suggestions. Turning off `backupDbOnUpdate` was the only way I was able to update my craft install; otherwise it was timing out and causing havoc. `devMode` is now off however the issues started before I had activated it.  
  
  ---
  
  ## 0 answers
  
  