Just wondering the best route for determining PHP memory size from a best practices point of view. We're currently at around 64 MB and have no issues unless somebody tries to delete a lot of pages or posts as once, which is rare.
While memory isn't an issue on our server, we only use 20% of allotted, my understanding is that you don't want to set excessively high values for PHP as it will allow runaway processes to run even longer and get excessively out of control.... is this understanding correct?
Is the best route to use a memory limit that works and if you get errors, bump it up? Or is there an optimal range we should stick in for a growing MU install?
Just wondering the best route for determining PHP memory size from a best practices point of view. We're currently at around 64 MB and have no issues unless somebody tries to delete a lot of pages or posts as once, which is rare.
While memory isn't an issue on our server, we only use 20% of allotted, my understanding is that you don't want to set excessively high values for PHP as it will allow runaway processes to run even longer and get excessively out of control.... is this understanding correct?
Is the best route to use a memory limit that works and if you get errors, bump it up? Or is there an optimal range we should stick in for a growing MU install?
6593 pointsLike some sort of WPMU DEV GodExceptionally helpfulLifetime member
Keeper of the Dark Chocolate
—
22nd January 2010 (2 years ago)
#
We're running 128megs on our boxes as a default but that's more for the Gallery installs as trying to get a sitemap out of one of those with 40k pictures is a b*cough*h. Another platform as well but I don't have my notes handy.
I'm just on my 7th site, trying to clone my autoblog with all the existing plugins. But I'm already getting the the fatal error mesage (out of memory) at 64MB. What should be my minimum memory limit for PHP? Do I need to move already to VPS hosting? or is there anything else I can do? Tried to edit php.ini to 128MB and wp-config.php as well. It made me create 1 additional site but error showed again when attempting to create the next one. Would appreciate any help too, thanks!
7026 pointsLike some sort of WPMU DEV GodMindblowingly helpful memberLifetime member
Lead Developer
—
11th February 2011 (1 year ago)
#
I use 128MB on my multisite installs.
Most likely your shared hosting won't let you raise your memory limit that high. You'll have to ask them. Also it would be helpful to know what is using up your memory, you should paste your errors and describe in more detail what you are doing to create it.
I was creating multiple wordpress autoblog sites which regularly run cron scripts . This was the error message that I used to get.
Fatal error: Out of memory (allocated 66846720) (tried to allocate 35 bytes) in /home/maxlife/public_html/healthydinnerrecipesreview.com/wp-includes/meta.php on line 311
After doing some research, I temporarily solved this issue by doing this:
?THIS TO BE ENTERED IN THE WP-CONFIG FILE WHICH IS IN THE ROOT OF THE WORDPRESS SETUP:
ENTER AFTER:?define('ABSPATH', dirname(__FILE__).'/');
THE FOLLOWING:
define('WP_MEMORY_LIMIT', '64M');
I ALSO CREATED A PHP.INI WHICH I UPLOADED TO THE PLUGIN FOLDER IN WP-CONTENT:
memory_limit = 128M; Maximum amount of memory a script may consume (64MB)?max_execution_time = 45;?upload_max_filesize = 10M;?post_max_size = 20M;
This let me clone 1 additional site to my existing range of 5 sites (1 domain, 4 subdomains)
As I tried to clone the blog template for the 7th site, I got this message:
Fatal error: Out of memory (allocated 66846720) (tried to allocate 46 bytes) in /home/maxlife/public_html/healthydinnerrecipesreview.com/wp-includes/wp-db.php on line 1420.
Tried to resolve this issue by doing the same but setting everything at 128M - But it didn't work anymore.
I;ve already deleted unused plugins.
For reference, this is the plugins list in the default blog template:
PowerAutoblog Cash Generator (cron set at daily)
Massive Passive Profits (another autoblog plugin) (cron set at hourly)
Privacy Policy
Akismet
AddToAny: Share/Bookmark/Email Button
Duplicate Posts Eraser
Exit Rescue
New Blog Templates
WPMU DEV Update Notifications
WP-phpMyAdmin
As I try to resolve this issue, i create test sites then delete and recreate and delete, etc within the super admin control panel (not sure if it affects memory in anyway)
2227 pointsLike some sort of WPMU DEV GodExceptionally helpfulLifetime member
Lifetime member!
—
16th February 2011 (1 year ago)
#
All depends on your hosting company.
On shared hosting those value cannot be modified if your hosting company does not allow it. So the only way is to ask them IF it is allowed, and what syntax / method to use to increase the value :)
On vps/dedicated this is a general php.ini value. I use 256 since I run several buddypress networks with big plugins.
Thanks for the reply. So is it normal for 64M to be used up right away given that I only have a few number of sites? Is regularly running cron scripts really that heavy ? (like 6-8 sites maximizing 64M of PHP memory limit already).
Responses (9)
Erstwhile founder — 22nd January 2010 (2 years ago) #
That's basically what we do. However, we typically start higher than 64MB.
How many users do you have?
Thanks,
Andrew
Member — 22nd January 2010 (2 years ago) #
Andrew, thank you for setting us straight, greatly appreciate your help!
Keeper of the Dark Chocolate — 22nd January 2010 (2 years ago) #
We're running 128megs on our boxes as a default but that's more for the Gallery installs as trying to get a sitemap out of one of those with 40k pictures is a b*cough*h. Another platform as well but I don't have my notes handy.
Member — 11th February 2011 (1 year ago) #
I'm just on my 7th site, trying to clone my autoblog with all the existing plugins. But I'm already getting the the fatal error mesage (out of memory) at 64MB. What should be my minimum memory limit for PHP? Do I need to move already to VPS hosting? or is there anything else I can do? Tried to edit php.ini to 128MB and wp-config.php as well. It made me create 1 additional site but error showed again when attempting to create the next one. Would appreciate any help too, thanks!
Lead Developer — 11th February 2011 (1 year ago) #
I use 128MB on my multisite installs.
Most likely your shared hosting won't let you raise your memory limit that high. You'll have to ask them. Also it would be helpful to know what is using up your memory, you should paste your errors and describe in more detail what you are doing to create it.
Member — 11th February 2011 (1 year ago) #
I was creating multiple wordpress autoblog sites which regularly run cron scripts . This was the error message that I used to get.
Fatal error: Out of memory (allocated 66846720) (tried to allocate 35 bytes) in /home/maxlife/public_html/healthydinnerrecipesreview.com/wp-includes/meta.php on line 311
After doing some research, I temporarily solved this issue by doing this:
?THIS TO BE ENTERED IN THE WP-CONFIG FILE WHICH IS IN THE ROOT OF THE WORDPRESS SETUP:
ENTER AFTER:?define('ABSPATH', dirname(__FILE__).'/');
THE FOLLOWING:
define('WP_MEMORY_LIMIT', '64M');
I ALSO CREATED A PHP.INI WHICH I UPLOADED TO THE PLUGIN FOLDER IN WP-CONTENT:
memory_limit = 128M; Maximum amount of memory a script may consume (64MB)?max_execution_time = 45;?upload_max_filesize = 10M;?post_max_size = 20M;
This let me clone 1 additional site to my existing range of 5 sites (1 domain, 4 subdomains)
As I tried to clone the blog template for the 7th site, I got this message:
Fatal error: Out of memory (allocated 66846720) (tried to allocate 46 bytes) in /home/maxlife/public_html/healthydinnerrecipesreview.com/wp-includes/wp-db.php on line 1420.
Tried to resolve this issue by doing the same but setting everything at 128M - But it didn't work anymore.
I;ve already deleted unused plugins.
For reference, this is the plugins list in the default blog template:
PowerAutoblog Cash Generator (cron set at daily)
Massive Passive Profits (another autoblog plugin) (cron set at hourly)
Privacy Policy
Akismet
AddToAny: Share/Bookmark/Email Button
Duplicate Posts Eraser
Exit Rescue
New Blog Templates
WPMU DEV Update Notifications
WP-phpMyAdmin
As I try to resolve this issue, i create test sites then delete and recreate and delete, etc within the super admin control panel (not sure if it affects memory in anyway)
Member — 16th February 2011 (1 year ago) #
Any help on this please? :)
Lifetime member! — 16th February 2011 (1 year ago) #
All depends on your hosting company.
On shared hosting those value cannot be modified if your hosting company does not allow it. So the only way is to ask them IF it is allowed, and what syntax / method to use to increase the value :)
On vps/dedicated this is a general php.ini value. I use 256 since I run several buddypress networks with big plugins.
Member — 16th February 2011 (1 year ago) #
Thanks for the reply. So is it normal for 64M to be used up right away given that I only have a few number of sites? Is regularly running cron scripts really that heavy ? (like 6-8 sites maximizing 64M of PHP memory limit already).
Become a member