arturictus / sidekiq_alive

Liveness probe for Sidekiq in Kubernetes deployments
MIT License
188 stars 57 forks source link

Use dedicated capsule for processing sidekiq-alive queue #96

Closed andrcuns closed 11 months ago

andrcuns commented 11 months ago

This introduces a separate capsule for handling sidekiq alive queue and makes it sequential because we don't really need to process multiple alive jobs in parallel.

andrcuns commented 11 months ago

@arturictus Could You please review this one and let me know what You think?

andrcuns commented 11 months ago

Did some testing in my app, and it seems we do need more than 1 connection in a pool. This is because we can end up calling unregister_current_instance for example concurrently.

I ended up getting ConnectionPool::TimeoutError: Waited 1 sec, 0/1 available error with just one connection in the pool

arturictus commented 11 months ago

This looks great!, thanks @andrcuns for this improvement.