[LRUG] Sidekiq / Heroku / Database Pool size.

Tim Craft mail at timcraft.com
Sun Jul 21 11:54:36 PDT 2013


Hi Tom,

> I have no idea what's happening - it's clearly only Sidekiq that's not got
> enough DB concurrency, but I've done everything recommended to alter it.
>
> Any thoughts? This is happening frustratingly regularly now, and causing
> issues in production.

Setting a DB_POOL environment variable won't do anything by itself,
you need to write some configuration code to make use of it. Given
that the error message specifies that the pool size is 5, I'm guessing
you don't have that in place. Something to specify the pool size when
configuring the sidekiq server, like this:

https://github.com/mperham/sidekiq/wiki/Advanced-Options#rails-32-and-newer

If you specify the limit directly in the config then you can do away
with the environment variable.

Alternatively I think you can specify the pool size in the
database.yml, but that would affect the web processes too, which you
may want to keep at a different level of concurrency.

Not actually tested this, just going off the articles. Hopefully it
fixes the issue :)

Cheers,
Tim



More information about the Chat mailing list