Skip to content

Latest commit

 

History

History
31 lines (23 loc) · 1.94 KB

5.0-Upgrade.md

File metadata and controls

31 lines (23 loc) · 1.94 KB

Welcome to Puma 5: Spoony Bard.

Puma 5 brings new experimental performance features, a few quality-of-life features and loads of bugfixes.

What's New

  • Better throughput and lower latency via new experimental option
  • Better memory usage via new experimental option
  • Better copy-on-write performance via new experimental option
  • Loads of bugfixes
  • Faster phased restarts and worker timeouts
  • pumactl now has a thread-backtraces command to print thread backtraces, bringing thread backtrace printing to all platforms, not just *BSD and Mac. (#2053)
  • Added incrementing requests_count to Puma.stats. (#2106)
  • Faster phased restart and worker timeout (#2220)
  • Added state_permission to config DSL to set state file permissions (#2238)
  • Ruby 2.2 support will be dropped in Puma 6. This is the final major release series for Ruby 2.2.

Upgrade

  • If you did not explicitly set environment before, we now check RAILS_ENV and use that, if available. This may effect which config file Puma attempts to load.
  • If you have been using the --control CLI option, update your scripts to use --control-url.
  • If you are using worker_directory in your config file, change it to directory.
  • If you are running MRI, default thread count on Puma is now 5, not 16. This may change the amount of threads running in production. We believe 5 is a better default for most Ruby web applications on MRI. Higher settings increase latency by causing GVL contention.
  • If you are using a worker count of more than 1 and you are not using phased_restart, Puma will now preload by default. We believe this is a better default, but may cause issues in non-Rails applications if you do not have the proper before and after fork hooks configured.
  • tcp mode and daemonization have been removed without replacement.
  • connected_port was renamed to connected_ports and now returns an Array, not an Integer.

Then, update your Gemfile:

gem 'puma', '< 6'