• Resolved jammy1000

    (@jammy1000)


    I have been experiencing issues with Redis and the issues persist or come up randomly until I flush the Redis fully then the issues go away for a couple of hours and then they come back probably as Redis start caching stuff. For example with Redis active, users cannot put a comment for woocommerce products as it just goes to ‘Error establishing a Redis connection - To disable Redis, delete the object-cache.php file in the /wp-content/ directory.

    Or, the checkout page does not work giving this kind of error ‘There was an error processing your order. Please check for any charges in your payment method and review your order history before placing the order again.‘ until I clear Redis cache…

    Or, sometimes when trying to install a plugin Redis crashes the website, or when trying to update a plugin, or create a page, and many more…

    Timeouts are all set to high, the maxclient number, and many other settings in the past few days all modified to mitigate the issue but no luck. The memory is not an issue as I have set 16 gb of RAM for Redis and it uses around 5 gb ram now.

    Any feedback on this?

    Diagnostics:

    Status: Connected
    Client: PhpRedis (v6.1.0)
    Drop-in: Valid
    Disabled: No
    Ping: 1
    Errors: []
    PhpRedis: 6.1.0
    Relay: Not loaded
    Predis: 2.1.2
    Credis: Not loaded
    PHP Version: 8.4.4
    Plugin Version: 2.5.4
    Redis Version: 6.2.17
    Multisite: No
    Metrics: Enabled
    Metrics recorded: 2345
    Filesystem: File modifications are not allowed.
    Global Prefix: "xxx_"
    Blog Prefix: "xxx_"
    Timeout: 300
    Read Timeout: 300
    Retry Interval:
    WP_REDIS_CLIENT: "phpredis"
    WP_REDIS_SCHEME: "tcp"
    WP_REDIS_HOST: "127.0.0.1"
    WP_REDIS_PORT: 6379
    WP_REDIS_DATABASE: 0
    WP_REDIS_TIMEOUT: 300
    WP_REDIS_READ_TIMEOUT: 300
    WP_REDIS_PREFIX: "uiv_redis_cache"
    WP_REDIS_PLUGIN_PATH: "/var/xxx/xxx.xxx/xxx/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"
    ]
    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"
    }
    Drop-ins: [
    "maintenance.php v by ",
    "Redis Object Cache Drop-In v2.5.4 by Till Krüss"
    ]

    redis-cli info memory

    used_memory:5380604960
    used_memory_human:5.01G
    used_memory_rss:5477302272
    used_memory_rss_human:5.10G
    used_memory_peak:5434960648
    used_memory_peak_human:5.06G
    used_memory_peak_perc:99.00%
    used_memory_overhead:275857376
    used_memory_startup:812184
    used_memory_dataset:5104747584
    used_memory_dataset_perc:94.89%
    allocator_allocated:5380619440
    allocator_active:5401038848
    allocator_resident:5472956416
    total_system_memory:33383559168
    total_system_memory_human:31.09G
    used_memory_lua:56320
    used_memory_lua_human:55.00K
    used_memory_scripts:1456
    used_memory_scripts_human:1.42K
    number_of_cached_scripts:2
    maxmemory:17179869184
    maxmemory_human:16.00G
    maxmemory_policy:volatile-lru
    allocator_frag_ratio:1.00
    allocator_frag_bytes:20419408
    allocator_rss_ratio:1.01
    allocator_rss_bytes:71917568
    rss_overhead_ratio:1.00
    rss_overhead_bytes:4345856
    mem_fragmentation_ratio:1.02
    mem_fragmentation_bytes:96922392
    mem_not_counted_for_evict:0
    mem_replication_backlog:0
    mem_clients_slaves:0
    mem_clients_normal:20616
    mem_aof_buffer:0
    mem_allocator:jemalloc-5.1.0
    active_defrag_running:0
    lazyfree_pending_objects:0
    lazyfreed_objects:0

    redis-cli DBSIZE

    (integer) 5040319
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Till Krüss

    (@tillkruess)

    Are you seeing any errors in your php error logs?

    Thread Starter jammy1000

    (@jammy1000)

    Hi Till, thx for the reply. Yes, for example for the Checkout issue which it will not go through giving the error I said before:

    [error] 667599#667599: *468869 FastCGI sent in stderr: "PHP message: RedisException: socket error on read socket in /var/xxx/xxx.com/xxx/wp-content/object-cache.php:1898
    Stack trace:

    0 /var/xxx/xxx.com/xxx/wp-content/object-cache.php(1898): Redis->eval()

    1 /var/xxx/xxx.com/xxx/wp-content/object-cache.php(1628): WP_Object_Cache->{closure:WP_Object_Cache::lua_flush_closure():1874}()

    2 /var/xxx/xxx.com/xxx/wp-content/object-cache.php(1800): WP_Object_Cache->execute_lua_script()

    3 /var/xxx/xxx.com/xxx/wp-content/object-cache.php(162): WP_Object_Cache->flush_group()

    4 /var/xxx/xxx.com/xxx/wp-content/plugins/my-theme/lib/cache/class-cache.php(93): wp_cache_flush_group()

    5 /var/xxx/xxx.com/xxx/wp-content/plugins/my-theme/lib/cache/class-cache.php(71): Theme_Cache::flush_object_caches()

    6 /var/xxx/xxx.com/xxx/wp-content/plugins/my-theme/lib/cache/class-cache.php(56): Theme_Cache::delete_query_product_transients()

    7 /var/xxx/t" while reading response header from upstream, client: 256.121.132.23, server: xxx.com, request: "POST /?wc-ajax=checkout HTTP/2.0", upstream: "fastcgi://127.0.0.1:9000", host: "www.xxx.com", referrer: "https://www.xxx.com/checkout/"

    Plugin Author Till Krüss

    (@tillkruess)

    These look like timeouts. How large is your Redis dataset?

    You might need to use WP_REDIS_DISABLE_GROUP_FLUSH (see README).

    Thread Starter jammy1000

    (@jammy1000)

    What would be the consequences of using ‘WP_REDIS_DISABLE_GROUP_FLUSH’? Bad and good.

    Plugin Author Till Krüss

    (@tillkruess)

    It’s more aggressive, but will avoid your timeouts.

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.