You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In out project Sidekiq freezes regularly, and we have to restart Sidekiq processes to make them work again. I wrote healthcheck mechanism to investigate this problem and got some interesting logs: https://gist.github.com/sigmaray/b9b4e974b1da614625652eb166848392 (healthchek + sidekiq stack traces)
I don't have expertise in analyzing sidekiq stack traces, so my assumption can be wrong. But it seems that Sidekiq processes are stuck when trying to connect to PostgreSQL
We are using PostgreSQL from Yandex Cloud and all connection to PostgreSQL seems to go through Odyssey pooler.
We have such configuration in database.yml:
default: &default
...
pool: 30 # equals to :concurrency in sidekiq.yml
timeout: 10000 # 10s in milliseconds
Having database timeout in database.yml doesn't help us to prevent sidekiq freezes. We had increased connection limit in managed PostgreSQL and that also didn't help.
I found similar issue, but it is very old and it's marked as fixed: #245
Does anyone know why this happens and how to avoid Sidekiq freezes?
There was a previous issue regarding to encoding through a connection proxy: #368
It is resolved since pg-1.5.4. But looking into the ActiveRecord sources, it looks like you're actively triggering this command by setting :encoding in your database config. Can you disable this config option?
I ran into a similar issue where timeouts/interrupts are sometimes not honored by ruby-pg. I was never able to reproduce the issue in a controlled environment but it was happening in production.
The fix was to set keepalives and tcp_user_timeout on the sockets.
Hi
In out project Sidekiq freezes regularly, and we have to restart Sidekiq processes to make them work again. I wrote healthcheck mechanism to investigate this problem and got some interesting logs:
https://gist.github.com/sigmaray/b9b4e974b1da614625652eb166848392 (healthchek + sidekiq stack traces)
I don't have expertise in analyzing sidekiq stack traces, so my assumption can be wrong. But it seems that Sidekiq processes are stuck when trying to connect to PostgreSQL
We are using PostgreSQL from Yandex Cloud and all connection to PostgreSQL seems to go through Odyssey pooler.
We have such configuration in database.yml:
Having database timeout in database.yml doesn't help us to prevent sidekiq freezes. We had increased connection limit in managed PostgreSQL and that also didn't help.
I found similar issue, but it is very old and it's marked as fixed:
#245
Does anyone know why this happens and how to avoid Sidekiq freezes?
Thanks
The text was updated successfully, but these errors were encountered: