[deploy] Enable Puma's nakayoshi_fork feature (#11121)
* Run GC.compact before fork * Change to nakayoshi_fork
This commit is contained in:
parent
ea156a201d
commit
0847c38196
1 changed files with 4 additions and 0 deletions
|
|
@ -26,6 +26,10 @@ pidfile ENV.fetch("PIDFILE") { "tmp/pids/server.pid" }
|
|||
#
|
||||
workers ENV.fetch("WEB_CONCURRENCY", 2)
|
||||
|
||||
# calls GC a handful of times and compacts the heap on Ruby 2.7+ before forking.
|
||||
# This may reduce memory usage of Puma on MRI.
|
||||
nakayoshi_fork
|
||||
|
||||
# Use the `preload_app!` method when specifying a `workers` number.
|
||||
# This directive tells Puma to first boot the application and load code
|
||||
# before forking the application. This takes advantage of Copy On Write
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue