Ticket #155 (assigned defect)

Opened 3 years ago

Last modified 10 months ago

eaccelerator + drupal under heavy load = php crashes

Reported by: coredump Assigned to: bart (accepted)
Priority: critical Milestone: 0.9.6
Component: eAccelerator Version: 0.9.5
Keywords: Cc:

Description

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 :(

Change History

08/02/06 23:49:51 changed by coredump

System info:

# uname -a
Linux hostname-removed 2.6.17-1.2142_FC4smp #1 SMP Tue Jul 11 22:57:02 EDT 2006 i686 i686 i386 GNU/Linux

Running on dual xeon (w/HT - 4 virtual CPUs).

08/07/06 00:33:58 changed by coredump

Setting eaccelerator.optimizer="0" did not help :(

08/22/06 21:20:57 changed by coredump

Couple of recent error messages before crash:

[31190] EACCELERATOR: PHP crashed on opline -1563882767 of (null)() at /--path-removed--/www/modules/block.module:164233217

Segmentation Fault in 31190, waiting for debugger
[31201] EACCELERATOR: PHP crashed on opline 1826884151 of (null)() at /--path-removed--/www/modules/block.module:8

Segmentation Fault in 31201, waiting for debugger

09/15/06 18:07:52 changed by bart

  • version set to 0.9.5.

I think this bug has been resolved in revision 272, I made a snapshot from the 0.9.5 branch so this can be tested.

http://snapshots.eaccelerator.net/eaccelerator-0.9.5-svn272.tar.gz

09/15/06 18:09:26 changed by bart

  • owner changed from somebody to bart.
  • status changed from new to assigned.

09/19/06 22:52:05 changed by coredump

Tried with the latest svn (rev 274, from trunk) + php 5.1.5. It did not help :(

[17977] EACCELERATOR: PHP crashed on opline 6 of (null)() at /--path-removed--/www/modules/pathauto.module:6

Segmentation Fault in 17977, waiting for debugger

Will try your snapshot / 0.9.5 branch.

10/26/06 21:53:56 changed by bart

If you still got this problem. Could you produce a backtrace of the problem?

(in reply to: ↑ description ) 05/14/08 23:50:08 changed by terrysduncan

See ticket 232. I would bet that the patch I submitted for that would help here too.

09/06/08 22:43:22 changed by benjamin

We had this bug on a DRUPAL as well and on SPIP cms too (see http://www.spip.org ) and the only ugly hack was to reboot apache when the sigfault happen.

Does someone know how to trace a sigfault in eAccelerator on a highly (I said HIGHLY!) loaded webserver?