I’m facing a lot of
ActiveRecord::ConnectionTimeoutError errors in sidekiq since I tuned Mastodon configuration.
I tried to increase the
DB_POOL, but i don’t know if it helps a lot…
Here is my
# Tuning DB_POOL=50 WEB_CONCURRENCY=4 MAX_THREADS=5 STREAMING_CLUSTER_NUM=3
Sidekiq startup command :
sidekiq -c 15 -q default -q mailers -q pull -q push
My postgres config (default i think?) :
max_connections = 100 shared_buffers = 128MB effective_cache_size = 4GB work_mem = 4MB maintenance_work_mem = 64MB min_wal_size = 80MB max_wal_size = 1GB checkpoint_completion_target = 0.5 wal_buffers = 4MB default_statistics_target = 100
An example of error in sidekiq :
pull | LinkCrawlWorker | 100146857493425188 | ActiveRecord::ConnectionTimeoutError: could not obtain a connection from the pool within 5.000 seconds (waited 5.000 seconds); all pooled connections were in use
What can I do to fix that ?