• Resolved Vitaliy

    (@waytrel)


    Message:
    Hello,

    We are using the Object Cache Pro plugin on our WordPress website, and occasionally, when clearing the cache, we see the following error message:

    Error establishing a Redis connection

    It doesn’t happen every time, but it appears intermittently during cache clearing. Could you please advise what might cause this and how we can prevent it from happening?

    My wp-config

    define( 'WP_REDIS_HOST', '127.0.0.1' );
    define( 'WP_REDIS_PORT', 6379 );

    // change the prefix and database for each site to avoid cache data collisions
    define( 'WP_REDIS_PREFIX', 'my-site' );
    define( 'WP_REDIS_DATABASE', 0 ); // 0-15

    // reasonable connection and read+write timeouts
    define( 'WP_REDIS_TIMEOUT', 1 );
    define( 'WP_REDIS_READ_TIMEOUT', 1 );

    define('WP_REDIS_CLIENT', 'phpredis');
    define('WP_REDIS_DISABLED', false);
    define('WP_REDIS_MAXTTL', 3600);
    define('WP_REDIS_CONNECT_PERSISTENT', false);
    define('WP_REDIS_DISABLE_GROUP_FLUSH', true);

    Thank you in advance for your help.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Vitaliy

    (@waytrel)

    redis.conf
    bind 127.0.0.1

    protected-mode yes

    port 6379

    tcp-backlog 511


    timeout 0

    tcp-keepalive 300


    daemonize no

    supervised no

    pidfile /var/run/redis_6379.pid

    loglevel notice

    logfile /var/log/redis/redis.log

    tcp-backlog 1024
    maxclients 60000



    databases 16


    save 900 1
    save 300 10
    save 60 10000

    stop-writes-on-bgsave-error yes

    rdbcompression yes

    rdbchecksum yes

    dbfilename dump.rdb

    dir /var/lib/redis




    slave-serve-stale-data yes

    slave-read-only yes

    repl-diskless-sync no

    repl-diskless-sync-delay 5



    repl-disable-tcp-nodelay no



    slave-priority 100













    appendonly no


    appendfilename "appendonly.aof"


    appendfsync everysec


    no-appendfsync-on-rewrite no


    auto-aof-rewrite-percentage 100
    auto-aof-rewrite-min-size 64mb

    aof-load-truncated yes


    lua-time-limit 5000










    slowlog-log-slower-than 10000

    slowlog-max-len 128


    latency-monitor-threshold 0


    notify-keyspace-events ""


    hash-max-ziplist-entries 512
    hash-max-ziplist-value 64

    list-max-ziplist-size -2

    list-compress-depth 0

    set-max-intset-entries 512

    zset-max-ziplist-entries 128
    zset-max-ziplist-value 64

    hll-sparse-max-bytes 3000

    activerehashing yes

    client-output-buffer-limit normal 256mb 64mb 60
    client-output-buffer-limit slave 256mb 64mb 60
    client-output-buffer-limit pubsub 256mb 64mb 60

    hz 10

    aof-rewrite-incremental-fsync yes
    Plugin Author Till Krüss

    (@tillkruess)

    Try setting your timeouts to 5s and see if that resolves it.

Viewing 2 replies - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.