IIRC, admin.php does that when you’re running upgrades, but I could be wrong… What were you doing when that happened?
Thread Starter
helpy
(@helpy)
When I refresh the dashboard, there will be 5 (five) entries in the server log with the mentioned error message.
I poked around but I can’t repro that.
What is your memory limit on that server?
Thread Starter
helpy
(@helpy)
The memory limit (listed in phpinfo()) is 128 MByte.
And some more information:
– PHP Version 5.2.12
– Apache/2.2
– WP 3.0 RC2 (was the same with RC1)
– Multisite is ON … using subdomains
(1 main blog, 1 blog on a sub domain)
– Buddypress … and some other Plugins
It may be a plugin that’s causing that error.
Thread Starter
helpy
(@helpy)
OK! I disabled all plugins (except buddypress) … it did not change anything!
Then I searched the code of wordpress and all installed plugins!
1. admin.php – line 90 + 91:
if ( current_user_can( ‘manage_options’ ) )
@ini_set( ‘memory_limit’, apply_filters( ‘admin_memory_limit’, ‘256M’ ) );
Nowhere else in the code the tag ‘admin_memory_limit’ is used!
This means, the function apply_filters will return the value ‘256M’ …
… if I interpret this code correctly???
cu,
guido
That looks like a correct interpretation, but I’ll have to sit and read the whole check and ifs to see if there’s a reason that gets called every time you run admin.php.
This is now out of my depth, sorry 🙁
Thread Starter
helpy
(@helpy)
Thank you for your time!
Solution, I do not like: ignore the “error” message in the server logs
cu, guido
I must have forgotten to hit the “post” button last night. Apologies to those I referred to this thread before I actually posted. 🙂
I believe I am seeing the same thing. Any access — just landing on the home page — tries to eat 256MB.
Ubuntu 9.04 x64 512MB VPS
Cherokee 1.0.5
MySQL 5.3.17
PHP 5.2.10 / Suhosin
phpinfo(): /etc/php5/cgi/php.ini with memory_limit=64MB
wp-config.php: define(‘WP_MEMORY_LIMIT’, ’64M’);
Note that regardless of how low I set memory limits (simultaneously in php.ini and wp-config.php) my server log indicates that wp-admin.php is trying to grab 256M, as described by Helpy earlier in this thread.
Symptoms are intense disk thrashing from a single pageload, leading to failed and partially rendered pages and server timeouts. Unusable.
I tried very hard to follow the directions to install WP3, but maybe I did something wrong. Any ideas about what I should check?
Or is it just a fact of life that WP really needs 256MB to be happy even with no plugins?
Thanks,
Carlos
OK, I think I’ve made some progress.
It now appears that the server logs complaining about an “attacker” trying to allocate 256MB and this being more than the php limit are only correlated with disk thrashing but not actually causation.
My VPS recently bumped my RAM from 360MB to 512MB, but I was still running with a 360MB swap. I increased my swap to 512MB and
- the log messages still appear; but
- thrashing has stopped.
I think this makes sense. Until I had WP going, everythign I had going on probably fit in 360MB of RAM most of teh time. So swapping, when even needed, was probably minimal. But now I have PHP grabbing up to 256MB. With only 360MB of swap, you can imagine the bottleneck. I don’t have enough data to say this was definitely the cause of the thrashing, but the data I do have is consistent with this theory. I will monitor this for a few hours to see.
So, yes, I did do something stupid.
Thanks,
Carlos
The way to fix this is open your admin.php file within the wp-admin directory and search for 256M. I believe its on line 96. Change this to the maximum allowed memory limit as declared within your php settings and then save.
The error is kicked up when wordpress attempts to increase the maximum memory limit for php. To be honest 256MB per php process is a HUGE amount of memory, I have happily used wordpress with a limit of 32MB and it has kept on ticking over fine.