All original content is created in Ukrainian. Not all content has been translated yet. Some posts may only be available in Ukrainian.Learn more

Sidekiq 7.3.x and connection_pool 3.0 - incompatibility that breaks workers

This content has been automatically translated from Ukrainian.
Recently, while deploying a Rails application on Coolify, I encountered an error that is not immediately obvious. Sidekiq starts, connects to Redis, but immediately crashes with the following error:
ArgumentError: wrong number of arguments (given 1, expected 0)
/gems/connection_pool-3.0.2/lib/connection_pool/timed_stack.rb:62:in `pop'
/gems/sidekiq-7.3.9/lib/sidekiq/scheduled.rb:226:in `initial_wait'
Reason
The connection_pool gem has been updated to version 3.0, where the API of the pop method has changed - it no longer accepts arguments. Sidekiq 7.3.x still calls it the old way, with an argument.
Bundler automatically pulls in the latest version of connection_pool, and the Sidekiq scheduler crashes immediately.
Fix
Add a version constraint in the Gemfile:
gem 'connection_pool', '~> 2.4'
Then:
bundle update connection_pool
This will install the latest compatible version (2.5.5), and Sidekiq will work correctly.
If your Sidekiq starts but immediately crashes with ArgumentError in connection_pool - check the version. This is a classic case where a transitive dependency breaks everything without any changes in your code.
Like it?React
🧵

This post doesn't have any additions from the author yet.

"No space left on device" - when Docker has consumed the entire disk
Feb 15, '26 19:57

"No space left on device" - when Docker has consumed the entire disk

Нотатки про Ruby та RoR
Connecting the Elasticsearch service to a Rails application (Coolify in the cloud, server on Hetzner).
Feb 15, '26 13:45

Connecting the Elasticsearch service to a Rails application (Coolify in the cloud, server on Hetzner).

Нотатки про Ruby та RoR
Mar 11, '26 15:50

Error Bundler::HTTPError Could not fetch specs from https://rails-assets.org/

Нотатки про Ruby та RoR
What is Exponential Backoff and Random Jitter?
Jan 15, '26 15:24

What is Exponential Backoff and Random Jitter?

Нотатки про Ruby та RoR
Thundering Herd Problem: what it is and why it breaks production
Jan 15, '26 10:14

Thundering Herd Problem: what it is and why it breaks production

Нотатки про Ruby та RoR
Fix for the issue of installing Ruby 3.4.3 (and not only) via RVM on macOS (Apple Silicon)
Dec 30, '25 14:05

Fix for the issue of installing Ruby 3.4.3 (and not only) via RVM on macOS (Apple Silicon)

Нотатки про Ruby та RoR
What is a B-Tree (Balanced Tree)?
Nov 22, '25 12:58

What is a B-Tree (Balanced Tree)?

Нотатки про Ruby та RoR