When does Resque open redis connection?

I ran into errors Redis::TimeoutError: Connection timed out

on Heroku and I am trying to pinpoint the problem. I am using Resque to connect to redis, so I wonder how Resque connects to redis:

  • When does Resque connect to redis? When does the worker start?
  • How long does a redis connection usually take?

It is not clear to me when the connections are made and how long they last. Can anyone shed some light on this for me? Thank!

+3


source to share


1 answer


Typically, connections to Redis applications from Rails are created lazily when the connection is first used. For troubleshooting, it is sometimes useful to hook up the connection by adding PING to the Redis initializer code ( http://redis.io/commands/ping ).

Once the connection is established, it will be maintained forever. If the connection is disconnected, it will try to reconnect the next time.



Also, keep in mind that since early 2015, Heroku has had a persistent problem connecting to Redis instances on AWS, as connections dropped from time to time. Heroku support is aware of this, so you can get some help by contacting them.

+1


source







All Articles