Migrating from Passenger 4 to 5 (Apache version)
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 state 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
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
- If you use out-of-band garbage collection, beware that the
X-Passenger-Request-OOB-Workheader has now been renamed to
- When using Rack's full socket hijacking, you must now output an HTTP status line.
- The PassengerStatThrottleRate option is now global.
PassengerTempDiroption has been replaced by two config options: PassengerInstanceRegistryDir and PassengerDataBufferDir.
PassengerUploadBufferDiroption has been replaced by PassengerDataBufferDir.