gem version

Migrating from Passenger 4 to 5

Relevant selection for this article:

Nginx

Passenger 5 comes with many major improvements and is mostly compatible with Passenger 4. This section highlights important and incompatible changes.

APT repository changed to 5.0

Our main APT repository switched to Passenger 5. If there is a pressing need to remain on Passenger 4, use the legacy Passenger 4 APT repository.

Full web server restart required

To avoid a broken st.ate where half of Passenger 4 is running and half of Passenger 5, you must fully restart the web server after upgrading to Passenger 5.

This means executing apachectl stop and apachectl start. An apachectl reload or even apachectl restart is not enough.

If you upgraded using APT, you must invoke the web server restart manually. APT does not do this for you!

Minimum Rails version: 2.3

We've dropped support for Rails version older than 2.3.

To make Rails 2.3 apps work with Passenger 5, the app must have a config.ru file. For example:

# Require your environment file to bootstrap Rails
require ::File.dirname(__FILE__) + '/config/environment'

# Serve static assets from RAILS_ROOT/public directory
# use Rails::Rack::Static
# Dispatch the request
run ActionController::Dispatcher.new

Restart mechanism changed

Using restart.txt to restart the app is still supported, but with the new default settings, Passenger won't notice any changes until after max 10 seconds. We recommend using the passenger-config restart-app command.

If you want to revert to the old restart.txt behavior (where any change is noticed immediately on the next request), set PassengerStatThrottleRate to 0.

Feature and configuration changes

light mode dark mode
Passenger 6 Passenger 6