Support » Plugin: Docket Cache - Object Cache Accelerator » “The Object Cache feature has been disabled at runtime”

  • Resolved patrickwgs

    (@patrickwgs)


    Hi there,

    For some reasons, I get this error : “The Object Cache feature has been disabled at runtime.”

    It’s on a Bedrock installation, so maybe it’s a permission issue because I had no problem on localhost.

    But since everything is writable I’m not too sure where to debug next.
    Thanks!

    Web Server	nginx / 1.18.0
    PHP SAPI	7.4.15 / fpm-fcgi
    Object Cache	Disabled at runtime.
    Zend OPcache	86M memory of 3253 files
    PHP Memory Limit	256M
    WP Frontend Memory Limit	40M
    WP Backend Memory Limit	256M
    Drop-in Writable	Yes
    Drop-in File	/app/cache/docket-cache/object-cache.php
    Drop-in use Wrapper	Yes
    Drop-in Wrapper Available	Yes
    Drop-in Wrapper File	/app/object-cache.php
    Cache Writable	Yes
    Cache Files Limit	50000
    Cache Disk Limit	500M
    Cache Path	/app/cache/docket-cache/cache/docket-cache
    Config Writable	Yes
    Config Path	/app/cache/docket-cache/docket-cache-data
Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Author Nawawi Jamili

    (@nawawijamili)

    Hi,

    That notice is only shown when the “DOCKET_CACHE_DISABLED” constant has been defined and set to “true”. Please check if it exists in your configuration file.

    Thanks.

    Thread Starter patrickwgs

    (@patrickwgs)

    Thanks – It was defined but set to false – I think it doesn’t check the value of the constant – only if defined.

    I played around with the config files and the Cache path seems broken. This is what I have defined:

    Config::define('DOCKET_CACHE_CONTENT_PATH','/var/www/html/wordpress/web/app/cache/docket-cache-content');
    Config::define('DOCKET_CACHE_DATA_PATH','/var/www/html/wordpress/web/app/cache/docket-cache-data');
    Config::define('DOCKET_CACHE_PATH','/var/www/html/wordpress/web/app/cache/docket-cache');

    Yet Cache path seems incorrect:
    Cache Path /app/cache/docket-cache-content/cache/docket-cache

    Web Server	nginx / 1.18.0
    PHP SAPI	7.4.15 / fpm-fcgi
    Object Cache Stats	4M object of 2312 files
    Object OPcache Stats	9M memory of 2109 files
    WP OPcache Stats	105M memory of 4032 files
    PHP Memory Limit	256M
    WP Frontend Memory Limit	40M
    WP Backend Memory Limit	256M
    Drop-in Writable	Yes
    Drop-in File	/app/cache/docket-cache-content/object-cache.php
    Drop-in use Wrapper	Yes
    Drop-in Wrapper Available	Yes
    Drop-in Wrapper File	/app/object-cache.php
    Cache Writable	Yes
    Cache Files Limit	2312 / 50000
    Cache Disk Limit	6M / 500M
    Cache Path	/app/cache/docket-cache-content/cache/docket-cache
    Config Writable	Yes
    Config Path	/app/cache/docket-cache-data

    Thank you for your support Nawawi!

    Plugin Author Nawawi Jamili

    (@nawawijamili)

    Thank you for reporting this issue. will try and fix it as soon as possible.

    Thanks.

    Plugin Author Nawawi Jamili

    (@nawawijamili)

    I can’t replicate the issue, set the DOCKET_CACHE_DISABLED constant to true and false it works as expected and the cache path seems it works fine. Maybe I’m using apache and tested on localhost, will test on nginx later. Please try to reload/restart nginx/php-fpm and see if can resolve this issue.

    Web Server	Apache
    PHP SAPI	7.4.15 / fpm-fcgi
    Object Cache Stats	59K object of 72 files
    Object OPcache Stats	178K memory of 73 files
    WP OPcache Stats	16M memory of 385 files
    PHP Memory Limit	256M
    WP Frontend Memory Limit	256M
    WP Backend Memory Limit	256M
    Drop-in Writable	Yes
    Drop-in File	/app/cache/docket-cache-content/object-cache.php
    Drop-in use Wrapper	Yes
    Drop-in Wrapper Available	Yes
    Drop-in Wrapper File	/app/object-cache.php
    Cache Writable	Yes
    Cache Files Limit	72 / 50000
    Cache Disk Limit	85K / 500M
    Cache Path	/app/cache/docket-cache
    Config Writable	Yes
    Config Path	/app/cache/docket-cache-data
    // config/application.php
    Config::define('DOCKET_CACHE_DISABLED', false);
    Config::define('DOCKET_CACHE_CONTENT_PATH','/home/awiedev/wpdev/wpdev-web/bedrock/web/app/cache/docket-cache-content');
    Config::define('DOCKET_CACHE_DATA_PATH','/home/awiedev/wpdev/wpdev-web/bedrock/web/app/cache/docket-cache-data');
    Config::define('DOCKET_CACHE_PATH','/home/awiedev/wpdev/wpdev-web/bedrock/web/app/cache/docket-cache');

    Thanks.

    Thread Starter patrickwgs

    (@patrickwgs)

    Fixed it. My production site is quite buttoned-down and permissions are tight. I think it couldn’t create the directories properly. I manually created the directories and it worked.

    If I may suggest, it would be great to do a sanity check when you get on the config page and check if the directories exist and if not, the error message of why it wasn’t able to create it.

    Thank you for the help!

    Plugin Author Nawawi Jamili

    (@nawawijamili)

    Noted and thank you for the suggestion. Will try to improve it in the next release.

    Thanks.

    Thread Starter patrickwgs

    (@patrickwgs)

    Thanks!

    I see this too on query monitor:
    touch(): Utime failed: Operation not permitted app/plugins/docket-cache/includes/src/Filesystem.php:453

    Probably related to permission issues

    Plugin Author Nawawi Jamili

    (@nawawijamili)

    Hi @patrickwgs

    You can try dev version here http://docketcache.com/devtest/docket-cache-dev2112.zip

    1. upload and replace current docket cache.
    2. remove docket-cache-data and docket-cache folders.

    Thanks.

    Thread Starter patrickwgs

    (@patrickwgs)

    Sorry for the delay Nawali,

    With the same config as above,

    Config::define('DOCKET_CACHE_CONTENT_PATH','/var/www/html/wordpress/web/app/cache/docket-cache-content');
    Config::define('DOCKET_CACHE_DATA_PATH','/var/www/html/wordpress/web/app/cache/docket-cache-data');
    Config::define('DOCKET_CACHE_PATH','/var/www/html/wordpress/web/app/cache/docket-cache');
    Config::define('DOCKET_CACHE_DISABLED', false);
    

    Now it works, but DOCKET_CACHE_PATH is still not respected and puts it in the cache content folder:

    Cache Writable	Yes
    Cache Files Limit	410 / 50000
    Cache Disk Limit	2M / 500M
    Cache Path	/app/cache/docket-cache-content/cache/docket-cache

    touch(): Utime failed: Operation not permitted app/plugins/docket-cache/includes/src/Filesystem.php is still there, however, line 500 this time.

    Plugin Author Nawawi Jamili

    (@nawawijamili)

    About the “touch” permission issue, you can try to define FS_CHMOD_FILE and FS_CHMOD_DIR constant.

    Config::define('FS_CHMOD_FILE', 0664);
    Config::define('FS_CHMOD_DIR', 0775);

    0775, 0664 will give both user and group read-write access in-case Nginx and PHP had different group and user.

    Also need to set 0775 permission on this path /var/www/html/wordpress/web/app/

    and manually remove

    /var/www/html/wordpress/web/app/cache/docket-cache-content
    /var/www/html/wordpress/web/app/cache/docket-cache-data
    /var/www/html/wordpress/web/app/cache/docket-cache

    About the Cache Path, I’m no idea why it did not respect the defined constant since it no issue on my installation, will update if found the ways.

    Thanks.

    Plugin Author Nawawi Jamili

    (@nawawijamili)

    After setup the new installation, I can replicate the issue. You’re right. Cache Path is not correct.

    Web Server	Apache
    PHP SAPI	7.4.15 / fpm-fcgi
    Object Cache	Disabled
    Zend OPcache	24M memory of 374 files
    PHP Memory Limit	256M
    WP Frontend Memory Limit	256M
    WP Backend Memory Limit	256M
    Drop-in Writable	No
    Drop-in File	/app/cache/docket-cache-content/object-cache.php
    Drop-in use Wrapper	Yes
    Drop-in Wrapper Available	Yes
    Drop-in Wrapper File	/app/object-cache.php
    Cache Writable	No
    Cache Files Limit	50000
    Cache Disk Limit	500M
    Cache Path	/app/cache/docket-cache-content/cache/docket-cache
    Config Writable	Yes
    Config Path	/app/cache/docket-cache-data

    Will update after fix it.

    Thank you.

    Plugin Author Nawawi Jamili

    (@nawawijamili)

    You can try dev version here https://docketcache.com/devtest/docket-cache-dev2113.zip

    and should fix the Cache Path issue.

    1. upload and replace current docket cache.
    2. remove docket-cache-content, docket-cache-data and docket-cache folders.

    Thanks.

    Thread Starter patrickwgs

    (@patrickwgs)

    @nawawijamili Yup, that fixed it!

    Thanks!

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘“The Object Cache feature has been disabled at runtime”’ is closed to new replies.