I have a busy drupal-based website running on lighttpd + php(fastcgi) (was running apache with preforking-mpm and mod_php before and had the same problem). PHP crashes 1-2 times per day once load reaches around 250+ request per second. I have tried both php 5.1.4 and 4.4.2.
Currently I'm running the latest cvs of eaccelerator (I'm updating it frequently)
Also apparently I'm not the only one facing this problem. See the following links for example:
http://drupal.org/node/75265
http://drupal.org/node/52534
I guess that it has something to do with lots of includes in drupal.
Any suggestions what can I do to trace the cause of this problem?
BTW, I've also tried APC, it does not crash but instead at some point it starts to screw up php output (I guess it actually screws up scripts/compiled code).
My php configure:
'./configure' '--enable-fastcgi' '--enable-discard-path' '--enable-force-redirect' '--with-xml' '--enable-bcmath' '--enable-calendar' '--with-curl' '--with-dom' '--with-dom-xslt' '--with-dom-exslt' '--enable-exif' '--enable-ftp' '--with-gd' '--with-gettext' '--with-kerberos' '--enable-mbstring' '--enable-mbstr-enc-trans' '--enable-mbregex' '--with-mcrypt' '--with-mhash' '--with-mysql' '--with-pear' '--enable-sockets' '--enable-track-vars' '--with-ttf' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--enable-gd-native-ttf' '--with-xmlrpc' '--with-zlib' '--with-ttf'
eaccelerator config:
[Zend]
zend_extension="/usr/local/lib/php/extensions/no-debug-non-zts-20050922/eaccelerator.so"
eaccelerator.shm_size="32"
eaccelerator.cache_dir="/tmp/eaccelerator"
eaccelerator.enable="1"
eaccelerator.optimizer="1"
eaccelerator.check_mtime="1"
eaccelerator.debug="0"
eaccelerator.filter=""
eaccelerator.shm_max="0"
eaccelerator.shm_ttl="0"
eaccelerator.shm_prune_period="0"
eaccelerator.shm_only="1"
eaccelerator.compress="1"
eaccelerator.compress_level="9"
Excerpt from the lighttpd config:
fastcgi.server = ( ".php" => ((
"bin-path" => php_bin + " -c " + basedir + "/root/" + php_ini,
"socket" => "/tmp/php.socket",
"max-procs" => 2,
"bin-environment" => (
"PHP_FCGI_CHILDREN" => "500",
"PHP_FCGI_MAX_REQUESTS" => "10000",
),
"bin-copy-environment" => (
"PATH", "SHELL", "USER", "LANG"
),
"broken-scriptfilename" => "enable"
)))
P.S.: Just turned off the optimizer (eaccelerator.optimizer="0"), let's see if it will help. I've tried this some time before though with an older verions of eaccelerator and it did not help :(