Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using eAccelerator to cache my PHP opcodes. I have the disk cache set to /var/cache/eAccelerator. How can I limit the size of the cache? It's already grown to 1.5 GiB and keeps growing!

share|improve this question
Really? Nobody knows? I guess I'll just write my own... – Josh Sep 24 '09 at 19:40

My guess, based on the eAccelerator documentation, is that it's caching more than you want it to.

I think what you want to do is flip

eaccelerator.shm_only = "0"


eaccelerator.shm_only = "1"

Maybe :)

Or you might consider quota-ing the cache directory? Not sure if that would backfire, or if it would cap its size, however.

Also, you might look at the compile-time option --with-eaccelerator-shared-memory. Not sure if that's related, but if scripts are storing results in cache, too - it could be an issue?

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.