OPcache "up and running" but doesn't cache any scripts
I installed and enabled OPcache (EasyApache 4, FastCGI, non-shared VPS) using WHM"Software"Easy Apache 4"All PHP Options + OpCache.
My sites run PHP 5.6.33 (ea-php56).
phpinfo() confirms that "Opcode caching" is "Up and Running".
I also monitor OPcache using opcache-gui-2.4.0. It tells me:
- number of cached files: 1
- number of hits: 0
- number of misses: 1
- number of blacklist misses: 0
- phpinfo(), part 1, showing the first page of the output
- phpinfo(), part 2, showing the OPcache part of the output
- the "Overview" tab of the output from opcache-gui script.
-
Hello Jim, Have you enabled PHP-FPM for the domain name in-question via "WHM >> MultiPHP Manager"? Additionally, check to see if the information in the following threads helps: Thank you. 0 -
Thanks, Michael! I had not enabled PHP-FPM for any of my accounts. Taking your implicit suggestion, I enabled PHP-FPM on all of my accounts and OPcache started working like it should (caching thousands of files, using its memory, etc.) Even with all that I had already read (including three of your links), I had never seen anyone say that PHP-FPM is a prerequisite for OPcache. Is that the case? 0 -
Even with all that I had already read (including three of your links), I had never seen anyone say that PHP-FPM is a prerequisite for OPcache. Is that the case?
Hello, It's not required, but Opcode caching programs are not compatible with the suPHP or CGI PHP handlers. The caching program either does not function, or functions incorrectly when using those handlers. Thus, you'd generally want to use either DSO or PHP-FPM. This is documented at: PHP Options - EasyApache 4 - cPanel Documentation Thank you.0 -
Thanks, Michael! I see (and had seen before) that "Opcode caching programs are not compatible with the suPHP or CGI PHP handlers. The caching program either does not function, or functions incorrectly." But I thought that Fast-CGI wasn't implicated (as being distinct from vanilla CGI). For example in: it says: [QUOTE]We strongly recommend that you use the DSO or fcgi PHP handlers if you install OPCache.
And I had thought that "fcgi" was synonymous with Fast-CGI. (Perhaps that was my error. Although if you search for "fcgi" on Wikipedia, it sends you to FastCGI.) In any case, whatever terminological confusions I might have, you've steered me where I needed to go to get OPcache up and running and actually caching files. My load times are better. Next step is to tune the parameters, where I've learned I can't reliably use MultiPHP INI Editor to do that. (Except, puzzlingling for the "opcache.revalidate_freq" which does seem to be successfully changed when I use MultiPHP INI Editor.) But your other posts, e.g., will be helpful. I may have questions about that, but that'll be a separate topic. Feel free to close this thread. Thanks!0
Please sign in to leave a comment.
Comments
4 comments