Support » Plugin: Redis Object Cache » Issue with cron – Connection Refused

  • Resolved ellmanncreative

    (@ellmanncreative)


    I’m using an external trigger for /path/to/my/website/wp-cron.php. This is managed by my webhost, and I have no clue as to how it works under the hood (though I suspect some implementation of a crontab, since I need to provide a filesystem path to the wp-cron.php file).

    The Object Cache plugin works OK in the website itself.

    However, when running via the trigger, I get:

    
    RedisException: Connection refused in /path/to/my/website/wp-content/object-cache.php:631
    Stack trace:
    #0 /path/to/my/website/wp-content/object-cache.php(631): Redis->connect('127.0.0.1', '6379', 1, NULL, NULL, 1)
    #1 /path/to/my/website/wp-content/object-cache.php(480): WP_Object_Cache->connect_using_phpredis(Array)
    #2 /path/to/my/website/wp-content/object-cache.php(173): WP_Object_Cache->__construct(true)
    #3 /path/to/my/website/wp-includes/load.php(701): wp_cache_init()
    #4 /path/to/my/website/wp-settings.php(131): wp_start_object_cache()
    ...
    

    I stress again: the plugin works when viewing the website directly.

    Please advise.

Viewing 16 replies (of 16 total)
  • Plugin Author Till Krüss

    (@tillkruess)

    I’d suggest triggering the WP from via a HTTP call in that case.

    Or alternatively, find the remote Redis credentials and make your config conditional in your CLI environment.

Viewing 16 replies (of 16 total)
  • You must be logged in to reply to this topic.