Title: Support Request: Redis Object Cache Plugin – Connection Issues and Errors
Last modified: September 6, 2024

---

# Support Request: Redis Object Cache Plugin – Connection Issues and Errors

 *  [Vimal Roy](https://wordpress.org/support/users/vimalroy08/)
 * (@vimalroy08)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/support-request-redis-object-cache-plugin-connection-issues-and-errors/)
 * Dear [@tillkruess](https://wordpress.org/support/users/tillkruess/) and Redis
   Object Cache Support Team,
 * We are currently using the Redis Object Cache plugin on our WordPress website,
   a high-traffic multilingual news platform that primarily focuses on cryptocurrency
   and blockchain-related content. Our website has over 56,000 posts in total, available
   in 8 languages, and we publish 30-50 new articles daily. Our team of 20-30 users,
   including publishers from various regions, actively works on the website simultaneously—
   creating, updating, publishing, and translating content.
 * Recently, we have been encountering several persistent issues that are impacting
   our site’s performance, detailed below:
    1. **Error Establishing Redis Connection**: We frequently receive errors such as`
       RedisException: read error on connection to /run/redis/redis-server.sock`. This
       typically occurs when clearing the cache for the first time each day, after 
       periods of inactivity, or when creating new posts. Despite having ample resources
       available, Redis seems unable to handle the connections consistently.
    2. **Socket Errors and HTTP 500 Errors**: We are experiencing repeated socket read
       failures and occasional HTTP 500 errors directly linked to Redis performance
       issues. These disruptions significantly affect our website’s availability and
       overall user experience.
    3. **Plugin-Related Issues**:
    4.  - **WPML**: Our website relies heavily on WPML for multilingual functionality,
          and we’ve noticed that Redis interactions frequently coincide with performance
          slowdowns when WPML is active.
        - **Yoast SEO**: Essential for our SEO strategy, Yoast is also generating a
          high number of Redis requests, which could be contributing to the connection
          issues.
        - **Wordfence**: Security is a priority for us, and Wordfence is critical. 
          However, it appears to be interacting with Redis in a way that may be contributing
          to the overall load.
        - **Post Views Counter**: We are currently evaluating whether this plugin is
          necessary, but it is also making frequent requests to Redis, adding to the
          load.
 * PFA :-
 * [https://www.awesomescreenshot.com/image/50430705?key=30ccd35b8b9f97b73d55606783f2019b](https://www.awesomescreenshot.com/image/50430705?key=30ccd35b8b9f97b73d55606783f2019b)
   
   [https://www.awesomescreenshot.com/image/50430704?key=cba43d0b0718defbee585926508fb7e4](https://www.awesomescreenshot.com/image/50430704?key=cba43d0b0718defbee585926508fb7e4)
 * Given these challenges, we are seeking your expertise and guidance. Are there
   any known fixes, configurations, or optimizations within the Redis Object Cache
   plugin that could help mitigate these issues? Specifically, are there ways to
   reduce or optimize the load generated by these plugins or exclude certain requests
   to Redis?
 * If there are any previously discussed solutions or recommendations that you could
   direct us to, it would be greatly appreciated.
 * Thank you in advance for your assistance. We look forward to your insights on
   resolving these issues and enhancing the stability and performance of our Redis
   setup.
 * Best regards,
 * Vimal Roy
    -  This topic was modified 1 year, 7 months ago by [Vimal Roy](https://wordpress.org/support/users/vimalroy08/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fsupport-request-redis-object-cache-plugin-connection-issues-and-errors%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 13 replies - 1 through 13 (of 13 total)

 *  [mathieu](https://wordpress.org/support/users/mathieu/)
 * (@mathieu)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/support-request-redis-object-cache-plugin-connection-issues-and-errors/#post-18003949)
 * I have the same issue… it’s happening way too often.
 *  Plugin Author [Till Krüss](https://wordpress.org/support/users/tillkruess/)
 * (@tillkruess)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/support-request-redis-object-cache-plugin-connection-issues-and-errors/#post-18006388)
 * With a team of 20-30 people you might want to consider using Object Cache Pro
   instead.
 * As for `read error on connection` and 500 errors, that’s your Redis Server not
   responding in time, are you monitoring Redis Server? What do the CPU charts look
   like?
 * I’d need to see Redis logs to tell you which commands are failing and why.
 * Consider setting these, that might help with timeout:
 *     ```wp-block-code
       WP_REDIS_DISABLE_GROUP_FLUSH=trueWP_REDIS_SELECTIVE_FLUSH=false
       ```
   
 *  Thread Starter [Vimal Roy](https://wordpress.org/support/users/vimalroy08/)
 * (@vimalroy08)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/support-request-redis-object-cache-plugin-connection-issues-and-errors/#post-18012056)
 * Hello [@tillkruess](https://wordpress.org/support/users/tillkruess/) ,
 * Thank you for your prompt response and for the suggestions provided.
 * To clarify, our team includes a mix of authors, editors, and administrators, 
   but only about 7-10 people are actively engaged in creating, translating, editing,
   and publishing articles at any given time. While we have multiple roles on the
   site, the actual number of concurrent users performing content-related tasks 
   is smaller, though they are often working simultaneously.
 * We appreciate the configuration recommendations, specifically the use of:
    - `WP_REDIS_DISABLE_GROUP_FLUSH=true`
    - `WP_REDIS_SELECTIVE_FLUSH=false`
 * However, we noticed in the Redis Object Cache plugin guide on GitHub that `WP_REDIS_SELECTIVE_FLUSH`
   is listed under Unsupported configuration options, with a note that options in
   this category may break without notice in future releases and won’t receive support
   from your team.
 * **Our questions are as follows:**
    1. **Stability and Future Compatibility:** Given that `WP_REDIS_SELECTIVE_FLUSH`
       is marked as unsupported, could you please provide insight into any potential
       risks associated with adding this constant? Specifically, are there any known
       stability issues, performance implications, or long-term concerns we should 
       be aware of?
    2. **Redis Server Monitoring:** We understand that the Redis Server not responding
       in time is a core issue, and we are actively monitoring its performance. However,
       could you please advise on what specific Redis logs or command failures we should
       be focusing on to better diagnose and address these connection errors?
    3. **Object Cache Pro Consideration:** We are open to exploring Object Cache Pro
       if it can provide enhanced stability and performance for our setup. Could you
       share more details on the expected benefits, particularly in the context of 
       our high-traffic, multilingual environment?
 * Additionally, we have attached a document containing Redis logs that capture 
   various warnings and errors, including RedisException events that are affecting
   our site. You can access the logs [here](https://docs.google.com/document/d/17xxXH37SFwu5bmvelSLA4NhBfZ-PMOLL7wZgaw5MBNQ/edit?usp=sharing).
   We would appreciate it if you could review these logs and provide any insights
   or recommendations based on the issues highlighted.
 * Your guidance on these queries would be invaluable as we work to optimize our
   Redis setup and mitigate these ongoing performance issues.
 * Thank you once again for your continued support, and we look forward to your 
   feedback.
 * Best regards,
 * Vimal Roy
 *  Plugin Author [Till Krüss](https://wordpress.org/support/users/tillkruess/)
 * (@tillkruess)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/support-request-redis-object-cache-plugin-connection-issues-and-errors/#post-18013441)
 * Correct, `WP_REDIS_SELECTIVE_FLUSH` is unsupported and off by default, I just
   wanted to make sure you have it set to `false`.
 * As for Redis Server monitoring, there are various tools out there like New Relic
   and Datadog, if you’re already monitoring your infrastructure with a tool, they
   might have Redis monitoring as well.
 * Thanks for the sharing the logs, it’s not enough to go on, since the issue is
   Redis not responding at all or in time.
 * > Object Cache Pro Consideration: We are open to exploring Object Cache Pro if
   > it can provide enhanced stability and performance for our setup.
 * That’s exactly what is does, in that order 🤙
 *  Thread Starter [Vimal Roy](https://wordpress.org/support/users/vimalroy08/)
 * (@vimalroy08)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/support-request-redis-object-cache-plugin-connection-issues-and-errors/#post-18017502)
 * Hello [@tillkruess](https://wordpress.org/support/users/tillkruess/)
 * Thank you for your response and for the clarification.
 * To confirm, we have set `WP_REDIS_SELECTIVE_FLUSH` to `false` in the `wp-config.
   php` file as recommended.
 * Regarding the monitoring tools, we are currently not using New Relic, Datadog,
   or other specific Redis monitoring tools. While we do monitor the website, server
   load, and related metrics, we have not implemented any dedicated monitoring for
   Redis itself.
 * Upon reviewing yesterday’s logs, we identified two occurrences of 500 errors 
   related to Redis in the access logs. We have cross-referenced these with the 
   corresponding web server error logs and Redis error logs. For your reference,
   I have shared the details of these errors in the following Google Docs link: 
   [View Logs](https://docs.google.com/document/d/1-L3XT0XM1OQcyfiXzV7I-7S_MCGxAQ49odgKJThiNW0/edit?usp=sharing).
 * Since the previous logs were not sufficient for further analysis, we hope that
   these newly shared logs provide more clarity on the issues we are experiencing.
   Please review them and let us know your feedback or any additional recommendations.
 * If you need anything more or any other specific information/logs, please let 
   me know.
 * Thank you once again for your continued support.
 * Best regards,
   Vimal Roy
    -  This reply was modified 1 year, 6 months ago by [Vimal Roy](https://wordpress.org/support/users/vimalroy08/).
 *  Plugin Author [Till Krüss](https://wordpress.org/support/users/tillkruess/)
 * (@tillkruess)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/support-request-redis-object-cache-plugin-connection-issues-and-errors/#post-18031636)
 * The errors `socket error on read socket` and `read error on connection` are timeouts(
   or high latency responses).
 * Can you post the output of `redis-cli SLOWLOG GET`?
 *  Thread Starter [Vimal Roy](https://wordpress.org/support/users/vimalroy08/)
 * (@vimalroy08)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/support-request-redis-object-cache-plugin-connection-issues-and-errors/#post-18044335)
 * Dear [@tillkruess](https://wordpress.org/support/users/tillkruess/) ,
 * Thank you for your insights on the timeout issues. As requested, I have gathered
   the output from `redis-cli SLOWLOG GET`, which you can access through the following
   link:
 * [View SLOWLOG Output](https://docs.google.com/document/d/110oazVuC52RQhZEaC5z5Q033CJbeUcXNBPNdFA2xhVQ/edit?usp=sharing).
 * Could you please review the logs and provide any further recommendations on how
   we might reduce or fix these timeout errors? We are particularly interested in
   understanding if there are any specific Redis configurations or optimizations
   we could implement to mitigate these socket timeouts and high-latency responses.
 * Your guidance on resolving this issue would be greatly appreciated, as the timeouts
   are affecting our website’s stability and performance.
 * Thank you once again for your continued support.
 * Best regards,
   Vimal Roy
 *  Plugin Author [Till Krüss](https://wordpress.org/support/users/tillkruess/)
 * (@tillkruess)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/support-request-redis-object-cache-plugin-connection-issues-and-errors/#post-18066049)
 * It looks like your `FLUSHDB` calls are extremely slow. I can’t tell you why, 
   they really shouldn’t be. This would be a question for your devops team.
 * You can alternatively use Object Cache Pro which has asynchronous flushing. Happy
   to send over a discount, if it’s too pricy.
 *  Thread Starter [Vimal Roy](https://wordpress.org/support/users/vimalroy08/)
 * (@vimalroy08)
 * [1 year, 5 months ago](https://wordpress.org/support/topic/support-request-redis-object-cache-plugin-connection-issues-and-errors/#post-18079173)
 * Dear Till(@tillkruess ),
 * Thank you for reviewing the logs and providing your insights. We appreciate the
   feedback regarding the slow `FLUSHDB` calls. I will consult with our devops team
   to investigate why these operations are taking longer than expected.
 * Regarding Object Cache Pro, we are open to exploring its asynchronous flushing
   capability if it can help mitigate this issue and improve overall performance.
   Please do send over the discount details, and we’ll review the pricing to assess
   whether it fits within our current budget.
 * Thank you again for your support. We look forward to any further recommendations
   you may have.
 * Best regards,
   Vimal Roy
 *  Thread Starter [Vimal Roy](https://wordpress.org/support/users/vimalroy08/)
 * (@vimalroy08)
 * [1 year, 5 months ago](https://wordpress.org/support/topic/support-request-redis-object-cache-plugin-connection-issues-and-errors/#post-18088378)
 * Dear Till ( [@tillkruess](https://wordpress.org/support/users/tillkruess/) ),
 * Thank you for your continued support in troubleshooting the Redis timeout issues.
 * I reached out to our server management team, and they tested the `FLUSHDB` calls
   on our staging server. Based on their results, the first call took 2.47 seconds,
   but subsequent flushes were instantaneous, with no noticeable delay. Here’s a
   snippet of their testing:
 *     ```wp-block-code
       root@coinedition-staging:~# redis-cli127.0.0.1:6379> FLUSHDBOK(2.47s)127.0.0.1:6379> FLUSHDBOK127.0.0.1:6379> FLUSHDBOK127.0.0.1:6379> FLUSHDBOK
       ```
   
 * Given these findings, they’ve asked if there are any additional or alternative
   methods to test this further or recreate the slow `FLUSHDB` calls as we observed
   on the production environment. Any guidance or suggestions on additional steps
   we can take to help replicate this issue would be greatly appreciated.
 * Thank you once again for your assistance, and we look forward to hearing your
   thoughts on how to proceed.
 * Best regards,
   Vimal Roy
    -  This reply was modified 1 year, 5 months ago by [Vimal Roy](https://wordpress.org/support/users/vimalroy08/).
    -  This reply was modified 1 year, 5 months ago by [Vimal Roy](https://wordpress.org/support/users/vimalroy08/).
 *  Plugin Author [Till Krüss](https://wordpress.org/support/users/tillkruess/)
 * (@tillkruess)
 * [1 year, 5 months ago](https://wordpress.org/support/topic/support-request-redis-object-cache-plugin-connection-issues-and-errors/#post-18089019)
 * You can simulate a slow `FLUSHDB` by filling up your Redis Server with fake keys,
   try 100k and 1M to see the impact. If you share your email I can get you a Object
   Cache Pro discount which would resolve this issue for you.
 *  Thread Starter [Vimal Roy](https://wordpress.org/support/users/vimalroy08/)
 * (@vimalroy08)
 * [1 year, 5 months ago](https://wordpress.org/support/topic/support-request-redis-object-cache-plugin-connection-issues-and-errors/#post-18096108)
 * Hello Till( [@tillkruess](https://wordpress.org/support/users/tillkruess/) ),
 * Thank you for the update and the suggestion to simulate the slow `FLUSHDB` calls.
   We will proceed with the testing as you mentioned by filling up the Redis server
   with fake keys and checking the impact.
 * .
 * We appreciate your continued assistance and look forward to hearing from you 
   regarding the discount.
 * Best regards,
   Vimal Roy
 *  Thread Starter [Vimal Roy](https://wordpress.org/support/users/vimalroy08/)
 * (@vimalroy08)
 * [1 year, 5 months ago](https://wordpress.org/support/topic/support-request-redis-object-cache-plugin-connection-issues-and-errors/#post-18099490)
 * Hello Till( @tillkruess ),
 * Thank you for the suggestion regarding simulating slow FLUSHDB calls. We proceeded
   with the test on our staging server, and while there was no delay with 100k fake
   keys, the process got stuck when attempting to fill Redis with 1M keys using 
   the following script:
 *     ```wp-block-code
       for i in $(seq 1 1000000); do  redis-cli SET "key:$i" "value for key $i" > /dev/nulldone
       ```
   
 * Would you recommend an alternative way of filling the Redis server with a larger
   number of fake keys to help us complete the testing?
 * Looking forward to your feedback.
 * Best regards,
   Vimal Roy

Viewing 13 replies - 1 through 13 (of 13 total)

The topic ‘Support Request: Redis Object Cache Plugin – Connection Issues and Errors’
is closed to new replies.

 * ![](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/)

## Tags

 * [cache](https://wordpress.org/support/topic-tag/cache/)
 * [object-cache](https://wordpress.org/support/topic-tag/object-cache/)
 * [redis](https://wordpress.org/support/topic-tag/redis/)
 * [requests](https://wordpress.org/support/topic-tag/requests/)

 * 13 replies
 * 3 participants
 * Last reply from: [Vimal Roy](https://wordpress.org/support/users/vimalroy08/)
 * Last activity: [1 year, 5 months ago](https://wordpress.org/support/topic/support-request-redis-object-cache-plugin-connection-issues-and-errors/#post-18099490)
 * Status: not resolved