When APC cache is full, it dangles Apache. Apache responds to demands, however waits forever for APC cache to free some assets, but this can never happen.

I run every ten minutes CRON job with my very own small expunge script, which removes expired records from APC. Ok, I possibly could increase the memory to APC and/or I possibly could run the expunge script more frequently. But that is a fantasy solution, I'm searching for newer and more effective way how to approach problem.

I've found that setting a ttl changes APC's behavior when cache is full. Automatically, when the ttl is , APC needs to empty the cache if this will get full. In the manual:

In case of a cache drained of available memory,the cache is going to be completely expunged if ttl is equivalent to . Otherwise, when the ttl is more than , APC will endeavour to get rid of expired records.

You could attempt to include a line to some script that's performed frequently to check on wether the cache is almost full and when it's, cope with it. A good example of such script might be a script that determines the bond to some database.

It isn't truly the final solution, however i wrote small PHP APC expunge script which i had suggested during my question. This script operates by CRON every ten minutes also it by hand removes expired products. It is not perfect solution, but a minimum of it will help a great deal.

I'm though still searching for final solution.