Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion config/puma.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@
# terminating a worker in development environments.
#
worker_timeout 3600 if ENV.fetch("RAILS_ENV", "development") == "development"
worker_timeout 12 if ENV.fetch("RAILS_ENV", "production") == "production"
# In production a worker that misses its heartbeat is killed by the master. The
# previous 12s was too tight under CPU pressure and caused mass worker thrash on
# busy nodes. Default to Puma's 60s and allow tuning without an image rebuild.
worker_timeout ENV.fetch("PUMA_WORKER_TIMEOUT", 60).to_i if ENV.fetch("RAILS_ENV", "production") == "production"

worker_shutdown_timeout 30
on_worker_boot do
Expand Down
Loading