Redis not connecting to Rails app

Hey everyone! I had a rails app that was working and I had a use-case some up that required sidekiq/redis.

I haven’t been able to successfully configure the app to connect the two together. The redis instance is up and running, and I can connect to it using fly redis connect, so I know the redis instance is working. And I can see workers when I run fly status, but it seems that the sidekiq workers aren’t connecting to the redis instance.

This is my sidekiq config: https://github.com/nheingit/knowledge-upload/blob/main/config/initializers/sidekiq.rb

And this is my toml file: https://github.com/nheingit/knowledge-upload/blob/main/fly.toml

I do see in my app logs that is looks like it tries to connect:

 dfw [info]2023-08-06T15:42:08.584Z pid=255 tid=2uv INFO: Sidekiq 7.1.2 connecting to Redis with options {:size=>10, :pool_name=>"internal", :url=>"redis://default:REDACTED@fly-knowledge-redis.upstash.io:6379"} 

But when I try and use any features of the app that use sidekiq they don’t fire off new jobs. and I don’t see anything logged out in the console. Any help would be appreciated!

If you run fly secrets list do you see REDIS_URL in the list? If not, running fly redis status on your redis instance will show you the Private URL you need.

Yeah the URL is set already, you can see it in the log there the URL it’s trying to hit

:url=>"redis://default:REDACTED@fly-knowledge-redis.upstash.io:6379"}

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.