herokuredisresquewebsub

Heroku: What happens when my Redis connection are all used?


I'm using Redis for Queue and a few other simple things. resque is one of them I will be using Redis for, my question is that what happens when my 10 connections all are used when using a resque ?

Will it wait until one of them finished and to go into a Que ? or it fails right away when my 10 connections are all in use.


Solution

  • If Redis is configured with a maxclients limit of 10, any new connection attempt will get the error ERR max number of clients reached. Resque will try to reconnect three times, and it will raise an error if it the max number of reconnection attempts is reached. You can see the code here.