What is a good rule of thumb for PHP memory size limit?
We are running a few apps like a CRM, ERP and a few other things. We have a dedicated server running Linux.
Thank you!
Bookmark/Search this post with
What is a good rule of thumb for PHP memory size limit?
We are running a few apps like a CRM, ERP and a few other things. We have a dedicated server running Linux.
Thank you!
For PHP memory limit, it depends on which applications you run and how much traffic you have.
A basic PHP setting is 32 MB, which should work for anything from a wordpress blog to a small business CRM, website and email.
Me however, I always set any new server to 64 MB for the PHP memory, and most public/web servers I'm involved with are running 128-254 MB memory.
How do you change PHP memory limit? I do not know what our PHP memory is set to now but I am sure it is not enough as we continue to get error messages like PHP Fatal error: Allowed memory size of 33274615 bytes exhausted (tried to allocate 412025 bytes) in page.php
Edit your php.ini file.
If you are getting an error message when running a script, the quick and easy fix is to increase your php memory limit. But it could be the sign of an underlying problem. Maybe sloppy script writing, or a memory leak somewhere. Take note of the exact error message you get because that could give you a lead as to where the problem is coming from.
The default php memory limit is 32 MB. I am assuming that since you can get access to php.ini or cPanel, you can increase the limit. If you have a hosting plan that lets you do that, you would for sure have enough memor capacity to bump it up to 128MB or higher.
But fix bad scripts first because when your site or application grows and has more load, the memory problem you put a band aid on will come back to bite you.
Pages