rhubarbgroup / redis-cache

A persistent object cache backend for WordPress powered by Redis. Supports Predis, PhpRedis, Relay, replication, sentinels, clustering and WP-CLI.
https://wordpress.org/plugins/redis-cache/
GNU General Public License v3.0
425 stars 148 forks source link

RedisException: socket error on read socket when Publish a post (Wordpress SEO enabled) #510

Closed abdusfauzi closed 5 months ago

abdusfauzi commented 6 months ago

Whenever I want to publish a post, the error socket error on read socket present itself. Screenshot below is the error (with Query Monitor enabled).

I wonder if this is Yoast SEO bug, or something else.

Description

I want to publish a post. When I clicked the "Publish" button, the page produce an error socket error on read socket. The error log is as below:

2024/03/07 15:34:55 [error] 5942#5942: *967964 FastCGI sent in stderr: "PHP message: RedisException: socket error on read socket in /home/website/web/app/object-cache.php:1830
Stack trace:
#0 /home/website/web/app/object-cache.php(1830): Redis->eval()
#1 /home/website/web/app/object-cache.php(1730): WP_Object_Cache->{closure}()
#2 /home/website/web/app/object-cache.php(162): WP_Object_Cache->flush_group()
#3 /home/website/web/app/plugins/wordpress-seo/src/builders/indexable-link-builder.php(710): wp_cache_flush_group()
#4 /home/website/web/app/plugins/wordpress-seo/src/builders/indexable-link-builder.php(623): Yoast\WP\SEO\Builders\Indexable_Link_Builder->update_incoming_links_for_related_indexables()
#5 /home/website/web/app/plugins/wordpress-seo/src/builders/indexable-link-builder.php(136): Yoast\WP\SEO\Builders\Indexable_Link_Builder->update_related_indexables()
#6 /home/website/web/app/plugins/wordpress-seo/src/integrations/watchers/indexable-post-watcher.php(20" while reading response header from upstream, client: 118.101.126.13, server: thevocket.com, request: "POST /wp/wp-admin/post.php HTTP/2.0", upstream: "fastcgi://unix:/run/php/php8.2-fpm.sock:", host: "thevocket.com", referrer: "https://thevocket.com/wp/wp-admin/post.php?post=485476&action=edit"

thevocket com_wp_wp-admin_post php

Expected Behavior

I expect the post will save, publish and back to the editing page.

Actual Behavior

Halted by error socket error on read socket and the post did not redirect back to the editing page.

Possible Fix

Not sure. I have tried to implement all suggestion installation configuration, including the redis.conf lazyfree-lazy-user-flush as yes as suggest here https://github.com/rhubarbgroup/redis-cache/pull/490#issuecomment-1795948671

Steps to Reproduce

  1. Edit or Create new Posts
  2. Save as Draft
  3. Press "Publish"

Additional context

I was trying to publish an article.

Environment

Constants

tillkruss commented 6 months ago

We're working on a fix in #509.

abdusfauzi commented 6 months ago

@tillkruss cool. sorry for the duplicated issue.

tillkruss commented 6 months ago

No worries, thanks for the detailed report!