I just installed wordpress 3.2.1 on a pretty fresh LAMP server (specs below). On a completely fresh wordpress install, wordpress is using all available memory (512 mb) after just a few handled requests. Pages tested (which both cause the same issue) are the pre made index page and the admin page.
Right after reboot i’ve just above 200 mb of memory available ($> free -m) and the available memory after each request to the wordpress instance decreases drastically, ending up in memory allocation errors on server after less than 20 requests and causing 500 server error from apache.
This issue is not occurring when using other non wordpress php pages on apache.
Non successful solutions have been to set memory_limit in php.ini and define(‘WP_MEMORY_LIMIT’, …) to various sizes.
System specs:
- WordPress 3.2.1
- PHP 5.3.2-1ubuntu4.9 (Zend Engine v.2.3.0)
- Apache 2.2.14
- Ubuntu 10.04 LTS 64-bit
Take a look at your apache mpm module config file. On ubuntu, it should be somewhere inside
/etc/apache2/modules.available
. There may be a large worker process number set for thick servers, and all the memory is used by worker processes which are not killed after request processing. Taking in account that each WP worker process uses about 40-50M of RAM, you only need 4 concurrent requests to consume 200MB, and thus all you need is to open WP dashboard because it makes a number of concurrent AJAX requests. You may want to use fastcgi configuration to be able to limit a number of PHP worker processes to save memory.