Skip to content

Commit 37925d7

Browse files
committed
Comment out puma's before_fork: This never gets called until switching single to cluster mode in Heroku
1 parent 26ad476 commit 37925d7

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

config/puma.rb

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,12 @@
4646
# process behavior so workers use less memory.
4747
preload_app!
4848

49-
before_fork do
50-
# NOTE: We use Rolling Restarts on Heroku with Puma web server
51-
# https://devcenter.heroku.com/articles/ruby-memory-use#too-many-workers-over-time
52-
# https://github.com/schneems/puma_worker_killer#only-turn-on-rolling-restarts
53-
require 'puma_worker_killer'
54-
55-
PumaWorkerKiller.enable_rolling_restart # Default is every 6 hours
56-
end
49+
# NOTE: Enable this mode when we switch from `single` to `cluster` mode (worker count > 0).
50+
# https://github.com/puma/puma/issues/2950
51+
#before_fork do
52+
# # NOTE: We use Rolling Restarts on Heroku with Puma web server
53+
# # https://devcenter.heroku.com/articles/ruby-memory-use#too-many-workers-over-time
54+
# # https://github.com/schneems/puma_worker_killer#only-turn-on-rolling-restarts
55+
# require 'puma_worker_killer'
56+
# PumaWorkerKiller.enable_rolling_restart # Default is every 6 hours
57+
#end

0 commit comments

Comments
 (0)