• Resolved chcw

    (@chcw)


    I am using the latest version of Redis Object Cache and WordPress.

    Recently from time to time, I will encounter the following error when trying to publish or update posts:

    Error establishing a Redis connection

    socket error on read socket

    WordPress is unable to establish a connection to Redis. This means that the connection information in your wp-config.php file are incorrect, or that the Redis server is not reachable.

    But this error is temporary. If I press back in the browser, the post list or the post will be able to show again. Then after some time, it will appear again.

    Why?

Viewing 16 replies (of 16 total)
  • Thread Starter chcw

    (@chcw)

    How often does the error occur?

    Afer every several days.

    Also just follow up that the error is fixed by using Unix socket:

    define( ‘WP_REDIS_SCHEME’, ‘unix’ );
    define( ‘WP_REDIS_PATH’, ‘/var/run/redis.sock’ );

    Therefore, based on my case, if Redis server is on the local computer, it is recommended to use unix socket instead of TCP port to improve the performance and reduce the socket connect error.

Viewing 16 replies (of 16 total)

You must be logged in to reply to this topic.