Reaching out to others! Free & Open Source Software, Kannada, L10n, L18n Data Science, Cloud Computing & more…

eAccelerator is a free open-source PHP accelerator, optimizer, and dynamic content cache. It increases the performance of PHP scripts by caching them in their compiled state, so that the overhead of compiling is almost completely eliminated. It also optimizes scripts to speed up their execution. eAccelerator typically reduces server load and increases the speed of your PHP code by 1-10 times.

Yes, i’m having trouble with eAccelerator on my VPS server. I could find that shared memory needs some alterations to the hardware node on which my VPS has been created. Luckily I could find the following solution in eAccelerator FAQ page itself.

I’m using linux 2.6 kernel and eAccelerator doesn’t get loaded when the shm_size is set to value bigger than 32mb. Php gives this warning: PHP Warning: [eAccelerator] Can not create shared memory area in Unknown on line 0

The default shared memory size for the 2.6 kernel is 32mb. You can change this size by setting /proc/sys/kernel/shmmax to the disired maximum value. You can do this by echo VAL > /proc/sys/kernel/shmmax or add the line kernel.shmmax=VAL to /etc/sysctl.conf so you don’t have to set it manualy every time you reboot.

(My bad, I can’t use this as this variable is not supported on VPS kernels)

If you are using VPS solution, make sure the share memory and socket buffers in VPS configuration are sufficient. For OpenVZ or similar type, you can check them by cat /proc/user_beancounter. In normal case all the fail count (failcnt) should be zero. You would need to ask your VPS provider to enlarge the barrier and limit value if you encountered any fail count increase once failed loading eaccelerator.

I need to get in touch with my VPS provider to get this working now.

You can find more solutions on eAccelerator on FAQ page here.