docs/7.0-Upgrade.md
Puma 7 brings better tail latency for keepalive-heavy traffic, support for fiber-per-request runtimes, and a handful of cleanup and compatibility changes across the server.
Here's what you should do:
For a complete list of changes, see History.md.
Puma 7 is focused on request lifecycle improvements and long-request correctness.
rack.response_finished support. Puma now supports the Rack hook for response completion.Check the following list to see if you're depending on any of these behaviors:
max_keep_alive is now 999.persistent_timeout is now 65 seconds.ArgumentError if called without a block.env['HTTP_VERSION'].Puma::Runner#ruby_engine has been removed.preload_app! is now the default in cluster mode. If you need the old behavior, set preload_app! false explicitly.Puma::Configuration must be clamp-ed before reading values.| Old hook name | New hook name |
|---|---|
on_worker_boot | before_worker_boot |
on_worker_shutdown | before_worker_shutdown |
on_restart | before_restart |
on_booted | after_booted |
on_stopped | after_stopped |
on_refork | before_refork |
on_thread_start | before_thread_start |
on_thread_exit | before_thread_exit |
on_worker_fork | before_worker_fork |
Then, update your Gemfile:
gem 'puma', '< 8'