I have a blog running on a FreeBSD 8.1 system with PHP 5.3.5 and APC 3.1.6.

At first everything seemes fine, but after a while (about 18-24 hours) all pages are served blank, and with a status code of 500. There is nothing in either the vhost, or the global Apache error logs, and PHP doesn't log anything either. The requests are only logged in the access log, with a 500 code. All the other vhosts on the server run fine while the blog is down. An Apache restart fixes the problem.

PHP error logging is enabled (the deprecated functions are logged) while the site is working.

Disabling APC for this vhost solved the issue, but that is not a long term solution, because the CPU load is roughly doubled this way.

Is this a WP issue, or an APC bug?

EDIT Forgot to add WP version, it is version 3.1.3

  • Do you have access to apc.php? Can you browse to that and look at the stats shown?
    – anu
    Jun 14, 2011 at 9:41
  • Yes, I have, but for that I have to re-enable APC, wait for it to "crash" again, and not restart apache until I dump all of the data. This is problematic for a site with that much traffic. Jun 14, 2011 at 11:31
  • do you have munin or any other system monitoring agent installed? and why do you need to re-enable APC to use apc.php?
    – anu
    Jun 14, 2011 at 13:54
  • Thanks for the idea. Yes, I have Munin on the server and added the php-apc module just now. Right now the issue seemes to be that APC ran out of memory, so I'm trying it now with an increased shm_size. Jun 14, 2011 at 16:31
  • What are you apc.ini settings? Are you using any user caching (W3 Total Cache, Super Cache etc.)? Sounds like your cache is getting full and your server doesn't have enough memory to handle it.
    – Chris_O
    Jun 14, 2011 at 16:31

2 Answers 2


Raising apc.shm_size from default value 32M to 256M in php.ini seems to do the trick for us.

edit: raising that value is not a bad idea, however it does not solve the issue in the long term. We are now considering removing either APC or Super Cache...

  • 500 ISE may indicate a problem with the configuration on the server. It could be a problem with your .htaccess file.
  • Thanks for the answer, but since the whole site works fine for a while, then all pages return a 500 error, and there are no error messages in the logs, and disabling APC solves the problem, this is not a .htaccess problem. Jun 14, 2011 at 16:36

Not the answer you're looking for? Browse other questions tagged or ask your own question.