Search code examples
phpapacheapache2apc

How to prevent Apache hangs when PHP APC cache completely fills up?


When APC cache is full, it hangs Apache. Apache responds to requests, however waits forever for APC cache to free some resources, but this will never happen.

I run every 10 minutes CRON job with my own small expunge script, which deletes expired entries from APC. Ok, I could add more memory to APC and/or I could run the expunge script more often. But that's not real solution, I am looking for some new way how to deal with issue.


Solution

  • It's not really the final solution, but I have written small PHP APC expunge script that I had proposed in my question. This script is run by CRON every 10 minutes and it manually removes expired items. It's far not perfect solution, but at least it helps a lot.

    I am though still looking for final solution.