Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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

share|improve this question

closed as off topic by EAMann May 3 '12 at 22:15

Questions on WordPress Development Stack Exchange are expected to relate to WordPress within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

    
Do you have access to apc.php? Can you browse to that and look at the stats shown? –  anu Jun 14 '11 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. –  Zsolt Sz. Jun 14 '11 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 '11 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. –  Zsolt Sz. Jun 14 '11 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 '11 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...

share|improve this answer
  • 500 ISE may indicate a problem with the configuration on the server. It could be a problem with your .htaccess file.
share|improve this answer
    
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. –  Zsolt Sz. Jun 14 '11 at 16:36

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