Reds connection timeout error when running sidekiq in aws elastic beanstalk

499 views
Skip to first unread message

Kevin Sun

unread,
Dec 4, 2020, 10:03:29 AM12/4/20
to Redis DB
Hi all,

I am trying to get my website ready for production and real traffic in a week, but am having trouble connecting to redis.

For my Ruby on Rails application, I am using the sidekiq gem to process jobs for our app. Sidekiq works with redis in order to list jobs and then process them. I have set up a redis elasticache cluster (in-transit encryption enabled) which I am able to connect successfully to through an 'openssl' command. The application seems to be running well with redis in this regard. However, the issue is when when trying to set up elastic beanstalk to automatically start up sidekiq (which uses redis) with some commands under the .elasticbeanstalk file. Sidekiq needs to be running in the background to process jobs, so I have set up a couple of shell scripts to start sidekiq up upon deployment.

The issue is I am getting a Redis Connection Timeout error which is what seems to be causing the sidekiq process to never take jobs off the queue and process them because it can't connect to redis. Solving this may require expertise with elastic beanstalk deployment, redis elasticache, and possibly some knowledge of rails as well.

I wrote a stack overflow post with more details here, please read it if you have a chance: https://stackoverflow.com/questions/65138894/redis-connection-timeout-error-when-running-sidekiq-in-elastic-beanstalk

My goal is to get the sidekiq jobs up and running again. Any help is greatly appreciated!

Thanks,

Kevin
Reply all
Reply to author
Forward
0 new messages