Report this

What is the reason for this report?

Idle Redis connection reconnects every five minutes

Posted on December 3, 2021

I’m using a Digital Ocean managed Redis database for a job queue. When the queue isn’t processing a job, I get consistent reconnect event logs every five minutes.

There’s nothing that I see in my code that disconnects and reconnects every five minutes so I’m wondering if this is something Digital Ocean does. Nothing is inherently broken with my application, I’m just curious as to why this happens.

I noticed that Heroku managed Redis does exactly this (at the same time interval too) to avoid running out of connections due to bad clients not disconnecting properly (see https://devcenter.heroku.com/articles/heroku-redis#timeout).

Any verification or documentation would be appreciated.



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

I have same issue, I am using redis pub/sub and my pub client is getting disconnected every 5 min while my sub client (pub duplicate - same connection options) don’t lose connection. Have you found some answers or do we have to live with it?

This does seem to be the default idle disconnect for DO’s managed Redis.

I upvote this question…switched from compose.com’s hosted Redis, and wasn’t having the problem there.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.