After browsing forums for a while could not find solution what causes this error.
My configuration. Open VZ virtual server, 2,4 gHz, 4 gigs ram. Debian 6 x32.
Now starts the weird part… web site runs normalyfor a while, then you get error 500, had the same configuration on different virtual machine, which is not under Open VZ.
When you change, php execution mode, from what ever before, to cgi, fcgi, or mod_php, site is back as normal and runs for a while, until error 500, again. this particular site has very small trafic 20 people a day.
error logs shows this
[Wed Sep 7 10:23:23 2011] [apc-error] apc_mmap: mmap failed: No space left on device
Premature end of script headers: php5.cgi
Poking around a bit on Google, it seems like most APC users who see the error you’re getting are OpenVZ users who are bumping into some sort of container limits.
Can you post the contents of your /proc/user_beancounters file? That would show what your limits are, and if there’s some limit that’s being hit.
Also, it looks like some folks were able to resolve the issue by setting these two options in their php.ini file (located in $HOME/etc/php.ini when using CGI or FCGID):
Ok i added as an atachment the beancounters file, about previos, code bit in php.ini i would need to solve it
in general, because this error is showed by almoust all sites randomly, that is oddi do not have very big traffic, which would hang the server somehow. BTW did i mention that i have 2 IP adreses, i read somewhere, that it could be ip related, that apache cant decide where to route request.