Reputation: 12214
I am just really fundamentally misunderstanding something about the purpose of queuing jobs in a background processor. Why do jobs begin when there are no database connections left? Here is the error I continue to get:
could not obtain a database connection within 5 seconds (waited 5.397317172 seconds). The max pool size is currently 25; consider increasing it.
I don't know how I am supposed to tell a job to not execute until there is a database connection available. I have looked everywhere. I sort of thought that was the purpose of queuing a job... to wait until the basic resources necessary for execution were available.
My db connection pool was at the default 5. It's at 25 now, and this is on a utility instance with no web server running at all.
What can I do to ensure that my jobs don't just fail like this?
Upvotes: 1
Views: 162
Reputation: 3462
By default, sidekiq creates 25 Processors. So you have to set your AR connection pool size as 25(Always set the pool size setting to something close or equal to the number of Processors).
Upvotes: 3