Question

Idle Redis connection reconnects every five minutes

Posted December 3, 2021 99 views
NetworkingRedisDatabasesDigitalOcean Managed Redis

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.

Submit an answer

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