Subscribe to How-To Geek

Segmentation Faults with eAccelerator and PHP 5.2.4

The first thing I did when moving to a dedicated virtual earlier this year was install a php opcode cache so the site would run at maximum speed all the time.

After consulting with most of my friends I ended up settling on XCache (although I don't exactly remember why), and I've had really good luck with it for months. Haven't had a single issue…

Because of the intense load the massive increase in readers has caused, and especially after introducing the forums, I decided to start looking for more options to speed up the server… so I turned to eAccelerator, which is not just an opcode cache but also an optimizer as well.

Everything seemed to be running well, and it even required a bit less memory than XCache, until I noticed that the WordPress MU site was down for more than 18 hours.

tail /var/log/http/error_log

[Tue Sep 25 22:36:08 2007] [notice] child pid 1615 exit signal Segmentation fault (11)
[Tue Sep 25 22:36:08 2007] [notice] child pid 7493 exit signal Segmentation fault (11)
[Tue Sep 25 22:36:08 2007] [notice] child pid 7494 exit signal Segmentation fault (11)

Crap!

So I've switched back to trusty XCache, and the problems stopped entirely. I'm not sure why the combination of Wordpress MU, eAccelerator and PHP 5.2.4 caused this issue for me, but maybe it's happened to you as well. If so, let me know.

This article was written on 09/27/07 and tagged with: Programming

Daily Email Updates

You can get our how-to articles in your inbox each day for free. Just enter your name and email below:


Name:
Email:

Comments (6)

  1. Mitchell

    Thanks! This saved me a lot of time. eAccelerator apparently causes a seg fault when you (wrongly) try to require / include a class that was already required / included from a different location. Turning off eAccelerator allowed PHP to spit the error out on the screen.

  2. The Geek

    Ah, that could have been the same problem I was having.

    Glad I could help! XCache has been rock solid, I don't think I'll switch again.

  3. Toby Johnson

    Another thanks for the post. After noticing segfaults when I upgraded 5.2.3 to 5.2.4 I Googled "php 5.2.4 segmentation fault" and yours was near the top. I was always a little skeptical of eAccelerator but now I've installed XCache as well and it seems to be rock solid and fast!

  4. The Geek

    Excellent, I'm glad this helped more than one person!

  5. james

    actually, i am getting segfault error, on Xcache.

    i have centos 5 w/ quad core on 2gb ram.

    i set the xcache.size to be 256mb and count to 4. and var_mem to 80mb

    can someone help me?

    did i set the cache size too high or something?

  6. Piku

    Have you tried APC


Leave a Comment




Leave your friendly comment here.

If you have a computer help question, click here to leave it on the forums instead.

Note: Your comment may not show up immediately on the site.

Sponsored Links
Getting Started
About How-To Geek
What Is That Process?
svchost.exe
jusched.exe
dwm.exe
ctfmon.exe
wmpnetwk.exe
wmpnscfg.exe
rundll32.exe
wfcrun32.exe
Ipoint.exe
Itype.exe
Wfica32.exe
Mobsync.exe
Cmd.exe
Dpupdchk.exe Adobe_Updater.exe

Copyright © 2006-2009 HowToGeek.com. All Rights Reserved.