• Resolved dydadou

    (@dydadou)


    Hi there,

    I’ve reach the maximum limit of file authorized on my server (260k files) for my website.
    While asking my host, they told me that my cache was representing about 140k files !
    I found that weird because I’m regularly purging my cache on W3TC.
    After a little investigation, it turned out that the issue was coming from Zend Opcache and my root .opcache folder.
    Now I’m wondering if this Zend Opcache is useful or if it could interfere with W3TC parameters.

    Zend Opcache is active through the php.ini instruction as follow :

    memory_limit = 268435456;
    post_max_size = 67108864;
    safe_mode = off;
    upload_max_filesize = 67108864;
    zend_extension=opcache.so;
    opcache.enable=1;opcache.memory_consumption=32;
    opcache.interned_strings_buffer=8;
    opcache.max_accelerated_files=3000;
    opcache.revalidate_freq=180;
    opcache.fast_shutdown=0;
    opcache.enable_cli=0;
    opcache.revalidate_path=0;
    opcache.validate_timestamps=2;
    opcache.max_file_size=0;
    opcache.file_cache=mywebsiterootpath.com/.opcache;
    opcache.file_cache_only=1;

    Here are my questions :
    1- Is zend opcache useless or complementary with W3TC ?
    2 – Should I deactivate Zend Opcache if I use W3TC ?
    3 – If so, how ? I tried to remove php.ini in order to deactivate zend but my website shuttled down with a error 500. So I guess this is not the right way… how should I do ?

    Many thanks !

    • This topic was modified 4 years, 1 month ago by dydadou.
Viewing 1 replies (of 1 total)
  • Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @dydadou

    I am sorry about the issue you are experiencing and I am happy to assist you with this.
    In Performance>General settings there is an Opcode cache sub-box which will automatically select Zend Opcace if available on your server. This means that W3 Total Cache works well with Zend.
    The Zend OPcache provides faster PHP execution through opcode caching and
    optimization. It improves PHP performance by storing precompiled script
    bytecode in the shared memory. This eliminates the stages of reading code from
    the disk and compiling it on future access. In addition, it applies a few
    bytecode optimization patterns that make code execution faster.
    YOu are using a persistent opcode cache. This allows PHP to store compiled code both in memory for fast execution and on disk for situations when the memory gets flushed
    SO you should also try to flush the cache by calling opcache_reset()
    To disable Opcache you need to edit the php.ini and change opcache.enable=1 to opcache.enable=0
    Your hosting provider will be able to help you more if you are unsure about this as this is set on the server.
    I hope this helps!
    Thanks!

Viewing 1 replies (of 1 total)
  • The topic ‘Zend Opcache in php.ini + W3TC’ is closed to new replies.