Eaccelerator is causing a Segmentation fault on our server. When the segmentation fault occurs the site is accessible, only the node pages are not. There is no error logged in the eaccelerator log. Only error logged is a segmentation error in apache:
child pid <22103> exit signal Segmentation fault (11)
On restart the site starts functioning and error is fixed.
The server conf details:
Hardware Component:
2 Seagate \ 146GB:SAS:15K \ ST3146855SS
4 Generic \ 2048 MB \ DDR2 667 ECC
1 Intel \ 2.13 GHz 1066FSB - Kentsfield \ Xeon 3210 (Quad Core)
1 Dell \ Single socket 1067FSB - Quad Core Capable \ PowerEdge 840
1 Adaptec \ 4-channel SAS/SATA RAID PCI Express \ 3405
Software:
Operating System: Redhat Enterprise Linux - OS ES 5.0
Apache: 2.2.3
PHP: 5.1.6
Mysql: 5.0.45
eAccelerator: 0.9.5.2
User Access and load stats per day:
201912 Pageviews, 40000 visits
E accelerator is definitely giving us a memory and CPU load benefit.
Possible causes:
- Some PHP functions could trigger this
- Mismatch between e accelerator version and PHP version
- E accelerator settings
E- accelerator settings:
zend_extension="/usr/lib/php/modules/eaccelerator.so"
eaccelerator.shm_size="16"
eaccelerator.cache_dir="/var/eaccelerator"
eaccelerator.enable="1"
eaccelerator.optimizer="0"
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="0"
eaccelerator.compress="1"
eaccelerator.compress_level="9"
eaccelerator.log_file = "/var/log/httpd/eaccelerator_log"
Immediate measure:
- Alerts when segmentation error occurs
- Automatic restart of the server
Using code recommended by 2bits refer: "Restart Apache after a segmentation fault"
Please provide any suggestions to work toward a NON segmentation fault state!

Comments
eAccelerator bug
http://eaccelerator.net/ticket/155
I was also suffering from this bug and finally opted to install APC, which seems to be more stable and actively developed.
ugh! After all these answers...
...it seems that eAccelerator is a dead project. Well, in fact not only from the look of the answers here, but also from looking at their issues queue.
Sad news again, turk mmcache died, now this one. :-(
I wonder if it would be reasonable to edit references in d.o. to eAccelerator to point the status of the project seems to be dead, so that no one else loose their time with it.
I ran into same issues last
I ran into same issues last year with eAccelerator and D5. After I switched to APC I never ever had this problem again and therefore migrated all my other machines to APC, too.
Alex
Use APC
We used the restart php script you link to on our site when we were on 4.7 and things worked reasonably well (one restart a week). Once we moved to Drupal 5, the restarts were once every few hours.
We switched to APC and never had a restart, and don't even run the restart script running.
The reasons for this is that eAccelerator development has all but stopped. No activity in the project at all. Pity, because it is the fastest one available and the most memory efficient too.
APC on the other hand is developed by the core PHP team, and therefore is always in sync with new releases that come out.
Drupal performance tuning, development, customization and consulting: 2bits.com, Inc..
Personal blog: Baheyeldin.com.
Drupal performance tuning, development, customization and consulting: 2bits.com, Inc..
Personal blog: Baheyeldin.com.
Another +1 For APC
I had the same problem on a site I managed when they were on Wordpress. Once we switched to APC the problem was history.
HollyIT - Grab the Netbeans Drupal Development Tool at GitHub.
Thanks for the support! WIll
Thanks for the support! Will switch to APC, and keep you updated.
Shyamala
Netlink Technologies Ltd
I blog and Twitter :)
Shyamala
Unimity Solutions
I can confirm this problem;
I can confirm this problem; on a heavy-loaded server with about 230 D6 installations
(~ 60K visits per day) it happened every two hours; the only solution until last week was to restart the apache.
Now i switched to APC - and the problem disappeared in no time,,,
although the cpu-load became around 5-10% greater.
Hardware:
IBM 345 two Dual-Core Xeon 3 GHz 32bit
4 GB RAM
RAID1 U320 SCSI dedicated raid for WWW-stuff
OS: Debian sarge
PHP Version: 5.2.0( 5.2.0-8+etch11)
eaccelerator: 0.9.5.3
kernel 2.6.26
apache2: 2.2.3-4 (2.2.3-4+etch5)
+ identical machine as DB-Server.
By the way - i even do not got the "Segmentation faults" in syslog - simply no nodes on the website/all nodes
got "white page". (And that isn't issue of php_memory_limit - i even tried with 128MB... - no effect).
When I suffered this problem
When I suffered this problem on Wordpress, I ended up tracking it down to requires and includes. Doing a require on the database layer would break it after awhile. Changing that to a require_once fixed it, even though that require never got hit more than once in the entire system load.
True when PHP6 comes out, APC will be integrated with it. It will be disabled by default, but using it will just be a quick setting change instead of installing a pear package.
HollyIT - Grab the Netbeans Drupal Development Tool at GitHub.
"instead of installing a pear package"? :-)
phpize
make
make install
apache2ctl restart
Come on, that was not really an effort. ;-)
Hi All, Our problem seems to
Hi All,
Our problem seems to have temporarily vanished with the eaccelerator optimizer set to 0, eaccelerator.optimizer="0". It was earlier eaccelerator.optimizer="1".
As e-accelerator development is not in progress, we are working towards moving to APC.
Some other unanswered questions:
1) What is the effect of Autologout on high configuration site?
2) Any alternate logging system to reduce the load from a statistics module?
3) The effect of the session settings in php.ini, session.gc_maxlifetime = 1440
Netlink Technologies Ltd
I blog and Twitter :)
Shyamala
Unimity Solutions
Logging system
If your server has high load you may consider following approach:
1. Use logs of server (i.e. Apache) + awstats updated by cron.
2. run awstats to parse log on another server or nightly when no load.
3. Apache work slower with logging. I prefer to log only php,html - content, no jpg,css,js etc.
4. Why Apache? nginx works much faster. nginx + php-fpm + e-accelerator 2-3 times faster and don't use so much memory like apache.
eaccelerator.shm_size="16" - you may consider to add some memory here
eaccelerator.compress="1" - there is no need if you use gzip/deflate in apache.
One cause of seg faults
Check to see if you have xcache.ini, apc.ini, or eaccelerator.ini in the/etc/php5/conf.d folder. I had a problem with xcache being declared in conf.d and eaccelerator being declared in php.ini. This caused all kinds of problems including seg faults.
Eric
Or php-fcgid
Using Apache with PHP fcgid provides similar benefits: it is very stable, works well with APC, and provides far better resource utilization than APache with mod_php.
It is available in stable version of distros (e.g. Debian's lenny and Ubuntu server 8.04 LTS).
Do you have benchmarks with Drupal on Apache + fcgid vs. ngnix + fpm to back up the 2-3X speed difference? If so, please post them in a new discussion.
Drupal performance tuning, development, customization and consulting: 2bits.com, Inc..
Personal blog: Baheyeldin.com.
Drupal performance tuning, development, customization and consulting: 2bits.com, Inc..
Personal blog: Baheyeldin.com.
One topic = one discussion
It is better in the future to create a new discussion for different topics, otherwise people will not find the information in the future easily.
Drupal performance tuning, development, customization and consulting: 2bits.com, Inc..
Personal blog: Baheyeldin.com.
Drupal performance tuning, development, customization and consulting: 2bits.com, Inc..
Personal blog: Baheyeldin.com.
Thanks Khalid and Andrey. I
Thanks Khalid and Andrey.
I have created separate topics for:
Autologout in High configuration sites</>
Any alternate logging system to reduce the load from a statistics module?
Netlink Technologies Ltd
I blog and Twitter :)
Shyamala
Unimity Solutions
Seg Faults
Ok... I load tested eaccelerator also and it did seg fault as I increased the load. Switched to ACP and no seg fault. Amazinggroups.com is curreintly pulling 99.7% from ACP cache for anonymous users. Big improvement in speed.
Ditto here. The Cornell
Ditto here. The Cornell Daily Sun had all kinds of issues with eaccelerator and segfaults. We switched to APC and all our problems went away.
APC is the way to go!
We had the same problem on servers with hight traffic, APC seems to play nice with Drupal 6. Haven't had a problem since switching! Segmentation Fault Article from Drupal Architect