chcw
Forum Replies Created
-
Forum: Plugins
In reply to: [Redis Object Cache] Socket error on read socketHow 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.
Forum: Plugins
In reply to: [Redis Object Cache] Socket error on read socketI find the Redis exception in the PHP error log that corresponds to this error:
[20-Jan-2026 08:32:13 UTC] RedisException: socket error on read socket in /home/dntest/public_html/wp-content/object-cache.php:560
Stack 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}Forum: Plugins
In reply to: [Redis Object Cache] Socket error on read socketIn 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.
Forum: Plugins
In reply to: [Redis Object Cache] Socket error on read socketThe diagnostics log is:
Status: Connected
Client: PhpRedis (v6.0.2)
Drop-in: Valid
Disabled: No
Ping: 1
Errors: []
PhpRedis: 6.0.2
Relay: Not loaded
Predis: 2.4.0
Credis: Not loaded
PHP Version: 8.2.30
Plugin Version: 2.7.0
Redis Version: 3.2.12
Multisite: No
Metrics: Enabled
Metrics recorded: 15683
Filesystem: Writable
Global Prefix: "wp_"
Blog Prefix: "wp_"
Timeout: 1
Read Timeout: 1
Retry Interval:
WP_REDIS_DATABASE: 0
WP_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.
Forum: Plugins
In reply to: [Redis Object Cache] Socket error on read socketOK. Below are the slow logs:
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"Forum: Plugins
In reply to: [Redis Object Cache] Socket error on read socketIt shows “Could not connect to Redis at slowlog: No such file or directory”
What does
redis-cli -s slowlog get 10show?Forum: Plugins
In reply to: [Redis Object Cache] Socket error on read socketAfter flushing, it is 42623 now.
How large is your redis dataset?
redis-cli dbsizeForum: Plugins
In reply to: [Redis Object Cache] Socket error on read socketI 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.
Forum: Plugins
In reply to: [Redis Object Cache] Socket error on read socketHow to get diagnostics?
Please post your diagnostics and read the FAQ. You might need to increase timeouts.
Forum: Plugins
In reply to: [Relevanssi - A Better Search] Create indexes to wp_relevanssi tableThank you for your answer.
There are many such queries in the slow query log:
SELECT COUNT(DISTINCT(relevanssi.doc)) FROM wp_relevanssi AS relevanssi
WHERE relevanssi.term = relevanssi.term;And ChatGPT said:
- Evidence:
Rows_examined: 532466for a query taking ~1.3 s but run every ~30 min - Why it hurts: Full scan because predicate is always true
- Fix method: Replace with
SELECT MAX(doc_id)that is covered by PK or add a composite index ((term, doc)) and query on a specific term.
Forum: Plugins
In reply to: [Redirection] Batch change redirections to 404Do you have an API that can operate the redirection data directly?
Also what is the structure of your tables?
Hi,
Can anyone help on this?
THat works perfectly. Thank you very much!
I have gotten the answer from another of your replies. Thank you so much!
- Evidence: