Background
I’m trying to get a Sidekiq service running alongside my Rails app.
Problem
The Dashboard indicates that the deploy failed, but in the logs I can see it is trying to run jobs (so the Sidekiq service is able to “see” my classes in Rails):
... class=ObscuredJob jid=f75331bde1707476951f1622 elapsed=0.003 INFO: fail
... WARN: {"context":"Job raised exception","job":{"retry":true,"queue":"default","class":"ObscuredJob","args":[],"jid":"f75331bde1707476951f1622","created_at":1649253557.791971,"enqueued_at":1649253581.3656337,"error_message":"ERR max number of clients reached","error_class":"Redis::CommandError","failed_at":1649253557.7921286,"retry_count":0},"jobstr":"{\"retry\":true,\"queue\":\"default\",\"class\":\"ObscuredJob\",\"args\":[],\"jid\":\"f75331bde1707476951f1622\",\"created_at\":1649253557.791971,\"enqueued_at\":1649253581.3656337,\"error_message\":\"ERR max number of clients reached\",\"error_class\":\"Redis::CommandError\",\"failed_at\":1649253557.7921286,\"retry_count\":0}"}
... WARN: Redis::CommandError: ERR max number of clients reached
... WARN: /opt/render/project/.gems/ruby/3.1.0/gems/redis-4.6.0/lib/redis/client.rb:162:in `call'
The error Redis::CommandError: ERR max number of clients reached
seems to indicate that my Redis settings here on Render are to blame. Can one not spin up a Rails app with Sidekiq using only free plans? The Redis docs show a connection limit of 50 for the free plan, and I don’t understand how I could have reached that limit already. Redis | Render · Cloud Hosting for Developers. Could someone advise if perhaps there are configurations to change in my app, or on my Render account itself?
Addendum:
The logs go on to output:
... ERROR: heartbeat: Connection lost (ECONNRESET)
... ERROR: ERR max number of clients reached
This error ERROR: heartbeat: Connection lost (ECONNRESET)
is probably the culprit for the deploy showing as “Failed”, correct? Like, the jobs keep trying and retrying, but they error on the Redis max clients reached until the service finally is like “I’ve had enough. I’m outta here.”