Title: Socket error on read socket
Last modified: December 25, 2025

---

# Socket error on read socket

 *  Resolved [chcw](https://wordpress.org/support/users/chcw/)
 * (@chcw)
 * [5 months ago](https://wordpress.org/support/topic/socket-error-on-read-socket-3/)
 * 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 15 replies - 1 through 15 (of 16 total)

1 [2](https://wordpress.org/support/topic/socket-error-on-read-socket-3/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/socket-error-on-read-socket-3/page/2/?output_format=md)

 *  Plugin Author [Till Krüss](https://wordpress.org/support/users/tillkruess/)
 * (@tillkruess)
 * [5 months ago](https://wordpress.org/support/topic/socket-error-on-read-socket-3/#post-18768591)
 * Please post your diagnostics and read the FAQ. You might need to increase timeouts.
 *  Thread Starter [chcw](https://wordpress.org/support/users/chcw/)
 * (@chcw)
 * [5 months ago](https://wordpress.org/support/topic/socket-error-on-read-socket-3/#post-18768603)
 * How to get diagnostics?
 * > Please post your diagnostics and read the FAQ. You might need to increase timeouts.
 *  Thread Starter [chcw](https://wordpress.org/support/users/chcw/)
 * (@chcw)
 * [4 months, 4 weeks ago](https://wordpress.org/support/topic/socket-error-on-read-socket-3/#post-18769933)
 * I try to increase the timeout and read timeout from default 1 to 5, but still
   get this error.
 * The only solution is to flush the cache.
 *  Plugin Author [Till Krüss](https://wordpress.org/support/users/tillkruess/)
 * (@tillkruess)
 * [4 months, 4 weeks ago](https://wordpress.org/support/topic/socket-error-on-read-socket-3/#post-18770051)
 * How large is your redis dataset? `redis-cli dbsize`
 *  Thread Starter [chcw](https://wordpress.org/support/users/chcw/)
 * (@chcw)
 * [4 months, 4 weeks ago](https://wordpress.org/support/topic/socket-error-on-read-socket-3/#post-18770064)
 * After flushing, it is 42623 now.
 * > How large is your redis dataset? `redis-cli dbsize`
 *  Plugin Author [Till Krüss](https://wordpress.org/support/users/tillkruess/)
 * (@tillkruess)
 * [4 months, 4 weeks ago](https://wordpress.org/support/topic/socket-error-on-read-socket-3/#post-18770270)
 * What does `redis-cli -s slowlog get 10` show?
 *  Thread Starter [chcw](https://wordpress.org/support/users/chcw/)
 * (@chcw)
 * [4 months, 4 weeks ago](https://wordpress.org/support/topic/socket-error-on-read-socket-3/#post-18770292)
 * It shows “Could not connect to Redis at slowlog: No such file or directory”
 * > What does `redis-cli -s slowlog get 10` show?
 *  Plugin Author [Till Krüss](https://wordpress.org/support/users/tillkruess/)
 * (@tillkruess)
 * [4 months, 3 weeks ago](https://wordpress.org/support/topic/socket-error-on-read-socket-3/#post-18775509)
 * Try giving `redis-cli` your host and port so it connects. We’d need to look at
   your `SLOWLOG` to see whats causing these timeouts.
 *  Thread Starter [chcw](https://wordpress.org/support/users/chcw/)
 * (@chcw)
 * [4 months, 3 weeks ago](https://wordpress.org/support/topic/socket-error-on-read-socket-3/#post-18775758)
 * OK. Below are the slow logs:
 *     ```wp-block-code
        1) 1) (integer) 2714    2) (integer) 1767669302    3) (integer) 38971    4) 1) "ZREMRANGEBYSCORE"       2) "site1-sitewp:redis-cache:metrics"       3) "0"       4) "1767665702" 2) 1) (integer) 2713    2) (integer) 1767668401    3) (integer) 15643    4) 1) "ZREMRANGEBYSCORE"       2) "site2-sitewp:redis-cache:metrics"       3) "0"       4) "1767664801" 3) 1) (integer) 2712    2) (integer) 1767665706    3) (integer) 29917    4) 1) "ZREMRANGEBYSCORE"       2) "site1-sitewp:redis-cache:metrics"       3) "0"       4) "1767662106" 4) 1) (integer) 2711    2) (integer) 1767664802    3) (integer) 14958    4) 1) "ZREMRANGEBYSCORE"       2) "site2-sitewp:redis-cache:metrics"       3) "0"       4) "1767661202" 5) 1) (integer) 2710    2) (integer) 1767662104    3) (integer) 32010    4) 1) "ZREMRANGEBYSCORE"       2) "site1-sitewp:redis-cache:metrics"       3) "0"       4) "1767658504" 6) 1) (integer) 2709    2) (integer) 1767661202    3) (integer) 16217    4) 1) "ZREMRANGEBYSCORE"       2) "site2-sitewp:redis-cache:metrics"       3) "0"       4) "1767657602" 7) 1) (integer) 2708    2) (integer) 1767658508    3) (integer) 48554    4) 1) "ZREMRANGEBYSCORE"       2) "site1-sitewp:redis-cache:metrics"       3) "0"       4) "1767654908" 8) 1) (integer) 2707    2) (integer) 1767657602    3) (integer) 14377    4) 1) "ZREMRANGEBYSCORE"       2) "site2-sitewp:redis-cache:metrics"       3) "0"       4) "1767654002" 9) 1) (integer) 2706    2) (integer) 1767654909    3) (integer) 26049    4) 1) "ZREMRANGEBYSCORE"       2) "site1-sitewp:redis-cache:metrics"       3) "0"       4) "1767651309"10) 1) (integer) 2705    2) (integer) 1767654002    3) (integer) 15870    4) 1) "ZREMRANGEBYSCORE"       2) "site2-sitewp:redis-cache:metrics"       3) "0"       4) "1767650402"
       ```
   
 *  Plugin Author [Till Krüss](https://wordpress.org/support/users/tillkruess/)
 * (@tillkruess)
 * [4 months, 2 weeks ago](https://wordpress.org/support/topic/socket-error-on-read-socket-3/#post-18779398)
 * That’s odd, no slow Lua scripts. Please post your diagnostics from _Settings 
   > Redis_.
 *  Thread Starter [chcw](https://wordpress.org/support/users/chcw/)
 * (@chcw)
 * [4 months, 2 weeks ago](https://wordpress.org/support/topic/socket-error-on-read-socket-3/#post-18779804)
 * The diagnostics log is:
 *     ```wp-block-code
       Status: ConnectedClient: PhpRedis (v6.0.2)Drop-in: ValidDisabled: NoPing: 1Errors: []PhpRedis: 6.0.2Relay: Not loadedPredis: 2.4.0Credis: Not loadedPHP Version: 8.2.30Plugin Version: 2.7.0Redis Version: 3.2.12Multisite: NoMetrics: EnabledMetrics recorded: 15683Filesystem: WritableGlobal Prefix: "wp_"Blog Prefix: "wp_"Timeout: 1Read Timeout: 1Retry Interval: WP_REDIS_DATABASE: 0WP_REDIS_PREFIX: "site1"WP_REDIS_PLUGIN_PATH: "/home/username/public_html/wp-content/plugins/redis-cache"Global Groups: [    "blog-details",    "blog-id-cache",    "blog-lookup",    "global-posts",    "networks",    "rss",    "sites",    "site-details",    "site-lookup",    "site-options",    "site-transient",    "users",    "useremail",    "userlogins",    "usermeta",    "user_meta",    "userslugs",    "redis-cache",    "blog_meta",    "image_editor",    "network-queries",    "site-queries",    "theme_files",    "translation_files",    "user-queries"]Ignored Groups: [    "counts",    "plugins",    "theme_json",    "themes",    "WPForms_Entry_Handler"]Unflushable Groups: []Groups Types: {    "blog-details": "global",    "blog-id-cache": "global",    "blog-lookup": "global",    "global-posts": "global",    "networks": "global",    "rss": "global",    "sites": "global",    "site-details": "global",    "site-lookup": "global",    "site-options": "global",    "site-transient": "global",    "users": "global",    "useremail": "global",    "userlogins": "global",    "usermeta": "global",    "user_meta": "global",    "userslugs": "global",    "redis-cache": "global",    "blog_meta": "global",    "image_editor": "global",    "network-queries": "global",    "site-queries": "global",    "theme_files": "global",    "translation_files": "global",    "user-queries": "global",    "counts": "ignored",    "plugins": "ignored",    "theme_json": "ignored",    "themes": "ignored",    "WPForms_Entry_Handler": "ignored"}Drop-ins: [    "advanced-cache.php v by ",    "maintenance.php v by ",    "Redis Object Cache Drop-In v2.7.0 by Till Krüss"]
       ```
   
 * Thank you.
 *  Plugin Author [Till Krüss](https://wordpress.org/support/users/tillkruess/)
 * (@tillkruess)
 * [4 months, 2 weeks ago](https://wordpress.org/support/topic/socket-error-on-read-socket-3/#post-18780692)
 * Try increasing the read timeout for 3 or 5 seconds, that might resolve it.
 *  Thread Starter [chcw](https://wordpress.org/support/users/chcw/)
 * (@chcw)
 * [4 months, 2 weeks ago](https://wordpress.org/support/topic/socket-error-on-read-socket-3/#post-18781051)
 * In the past, I have already tried to increase both the timeout and read timeout
   to 5 seconds. But that does not work. The only solution is flush the cache. And
   when I flush the cache for the first time, I will also get an error that seems
   your plugin cannot connect to the Redis server. But soon it becames OK.
 *  Thread Starter [chcw](https://wordpress.org/support/users/chcw/)
 * (@chcw)
 * [4 months ago](https://wordpress.org/support/topic/socket-error-on-read-socket-3/#post-18795112)
 * I find the Redis exception in the PHP error log that corresponds to this error:
 *     ```wp-block-code
       [20-Jan-2026 08:32:13 UTC] RedisException: socket error on read socket in /home/dntest/public_html/wp-content/object-cache.php:560Stack trace:#0 /home/dntest/public_html/wp-content/object-cache.php(560): Redis->ping()#1 /home/dntest/public_html/wp-content/object-cache.php(256): WP_Object_Cache->__construct(false)#2 /home/dntest/public_html/wp-includes/load.php(897): wp_cache_init()#3 /home/dntest/public_html/wp-settings.php(149): wp_start_object_cache()#4 /home/dntest/public_html/wp-config.php(146): require_once('/home/dntest/p...')#5 /home/dntest/public_html/wp-load.php(50): require_once('/home/dntest/p...')#6 /home/dntest/public_html/wp-admin/admin-ajax.php(22): require_once('/home/dntest/p...')#7 {main}
       ```
   
 *  Plugin Author [Till Krüss](https://wordpress.org/support/users/tillkruess/)
 * (@tillkruess)
 * [4 months ago](https://wordpress.org/support/topic/socket-error-on-read-socket-3/#post-18798842)
 * How often does the error occur?

Viewing 15 replies - 1 through 15 (of 16 total)

1 [2](https://wordpress.org/support/topic/socket-error-on-read-socket-3/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/socket-error-on-read-socket-3/page/2/?output_format=md)

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fsocket-error-on-read-socket-3%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://ps.w.org/redis-cache/assets/icon-256x256.gif?rev=2568513)
 * [Redis Object Cache](https://wordpress.org/plugins/redis-cache/)
 * [Support Threads](https://wordpress.org/support/plugin/redis-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/redis-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/redis-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/redis-cache/reviews/)

 * 16 replies
 * 2 participants
 * Last reply from: [chcw](https://wordpress.org/support/users/chcw/)
 * Last activity: [3 months, 2 weeks ago](https://wordpress.org/support/topic/socket-error-on-read-socket-3/page/2/#post-18812708)
 * Status: resolved