What happens when opcache hits max memory limit?


#1

I may simply be terrible at research, but I can’t seem to find an answer to this. I have opcache set to use 128M of memory (that’s all I can allow it to use at the moment until I get some more RAM for my VPS).

WHAT IN THE WORLD HAPPENS WHEN OPCACHE HITS THAT LIMIT?

I can’t find the answer to that anywhere. I’m guessing something not good. Is there a way to specify how often it should flush the cache and start from fresh? Is there a way to have it auto flush when it gets close to or hits the limit? So far the only way I know of clearing it is to manually restart php5-fpm. But that’s not very practical and even if I set a cron job to have php5-fpm restart once a day or something to clear the cache, it still feels to me like that’s not really a “solution”. At least not one that’s not half-baked.

If it helps I am on the latest version of PHP, using Nginx. Getting ~80,000 hits per month.


#2