1

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?

4

1 回答 1

3

默认情况下,sidekiq 创建25 个处理器。因此,您必须将 AR 连接池大小设置为25始终将池大小设置设置为接近或等于处理器数量)。

于 2014-04-01T13:07:46.587 回答