Skip to content

Commit 1455f51

Browse files
Remove redundant puma config (#941)
- Prompted by rails/rails@84cad15213ea5447ea089
1 parent 8868df0 commit 1455f51

File tree

1 file changed

+1
-23
lines changed

1 file changed

+1
-23
lines changed

config/puma.rb

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -26,32 +26,10 @@
2626
# Use the `preload_app!` method when specifying a `workers` number.
2727
# This directive tells Puma to first boot the application and load code
2828
# before forking the application. This takes advantage of Copy On Write
29-
# process behavior so workers use less memory. If you use this option
30-
# you need to make sure to reconnect any threads in the `on_worker_boot`
31-
# block.
29+
# process behavior so workers use less memory.
3230
#
3331
preload_app!
3432

35-
# If you are preloading your application and using Active Record, it's
36-
# recommended that you close any connections to the database before workers
37-
# are forked to prevent connection leakage.
38-
#
39-
# before_fork do
40-
# ActiveRecord::Base.connection_pool.disconnect! if defined?(ActiveRecord)
41-
# end
42-
43-
# The code in the `on_worker_boot` will be called if you are using
44-
# clustered mode by specifying a number of `workers`. After each worker
45-
# process is booted, this block will be run. If you are using the `preload_app!`
46-
# option, you will want to use this block to reconnect to any threads
47-
# or connections that may have been created at application boot, as Ruby
48-
# cannot share connections between processes.
49-
#
50-
# on_worker_boot do
51-
# ActiveRecord::Base.establish_connection if defined?(ActiveRecord)
52-
# end
53-
#
54-
5533
# Allow puma to be restarted by `rails restart` command.
5634
plugin :tmp_restart
5735

0 commit comments

Comments
 (0)