For anyone wondering if you can still use Sidekiq with the Upstash free tier… you can’t.
Apart from regular Redis calls directly related to running background jobs, Sidekiq has to make other calls to maintain its functionality.:
- Heartbeat thread makes lots of Redis calls every 5 seconds (or 10 seconds since Sidekiq v7.0.0) [1]
- While checking for queues with jobs to process, Sidekiq makes 1 blocking call per worker every 2 seconds [2]
Try to connect to Redis-CLI on your dev machine and use MONITOR command to see how many calls really Sidekiq does. [3]
With only 1 active worker, without scheduling any job it takes less than an hour for Sidekiq to reach the Upstash limit.
You can try using Sidekiq alternatives that don’t require Redis:
- Solid Queue (MySQL or PostgreSQL) [4]
- Lite Stack (SQLite) [5]
- Delayed Job (PostgreSQL and more) [6]
Or just use another Redis provider or simply pay Upstash for their services.
[1] sidekiq/lib/sidekiq/fetch.rb at v7.2.0 · sidekiq/sidekiq · GitHub
[2] sidekiq/lib/sidekiq/launcher.rb at v7.2.0 · sidekiq/sidekiq · GitHub
[3] MONITOR | Redis
[4] GitHub - basecamp/solid_queue: Database-backed Active Job backend
[5] GitHub - oldmoe/litestack
[6] GitHub - collectiveidea/delayed_job: Database based asynchronous priority queue system -- Extracted from Shopify