diff --git a/Gemfile b/Gemfile index ae9a6d57dc..bf102a0cc2 100644 --- a/Gemfile +++ b/Gemfile @@ -5,7 +5,7 @@ ruby '3.4.7' gem 'rails', '~> 8' gem 'pg', '~> 1.3.4' -gem 'puma', '~> 6.6' +gem 'puma', '~> 7.2' gem 'bcrypt', '3.1.17' gem 'rack', '~> 2.2.22' gem 'rack-timeout', '~> 0.7', require: 'rack/timeout/base' diff --git a/Gemfile.lock b/Gemfile.lock index d216721984..6fe5d86aff 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -337,7 +337,7 @@ GEM date stringio public_suffix (4.0.6) - puma (6.6.0) + puma (7.2.0) nio4r (~> 2.0) raabro (1.4.0) racc (1.8.1) @@ -551,7 +551,7 @@ DEPENDENCIES ostruct parallel_tests (~> 5.5) pg (~> 1.3.4) - puma (~> 6.6) + puma (~> 7.2) rack (~> 2.2.22) rack-attack (~> 6.6) rack-cors diff --git a/config/puma.rb b/config/puma.rb index ed9c69331a..aa8f53a066 100644 --- a/config/puma.rb +++ b/config/puma.rb @@ -30,9 +30,6 @@ http_content_length_limit max_request_size.to_i end -# FIXME(ezekg) https://www.heroku.com/blog/pumas-routers-keepalives-ohmy/ -enable_keep_alives false - # Ensure our backlog is drained drain_on_shutdown @@ -40,24 +37,24 @@ # This directive tells Puma to first boot the application and load code # before forking the application. This takes advantage of Copy On Write # process behavior so workers use less memory. If you use this option -# you need to make sure to reconnect any threads in the `on_worker_boot` +# you need to make sure to reconnect any threads in the `before_worker_boot` # block. preload_app! # Add some logging to understand what Puma is doing -on_worker_boot do +before_worker_boot do Keygen.logger.info("[puma] [#{Process.pid}] worker boot event") end -on_worker_shutdown do +before_worker_shutdown do Keygen.logger.info("[puma] [#{Process.pid}] worker shutdown event") end -on_refork do +before_refork do Keygen.logger.info("[puma] [#{Process.pid}] refork event") end -on_restart do +before_restart do Keygen.logger.info("[puma] [#{Process.pid}] restart event") end