Phusion Passenger 2.1.3 released

By Hongli Lai March 31st, 2009

Phusion Passenger is an Apache module for deploying Ruby on Rails web applications, and is mainly focused on ease of use and stability.

Recent changes

Phusion Passenger is under constant maintenance and development. We are pleased to announce Phusion Passenger version 2.1.3. This is a bug fix release.

The following things have changed since 2.1.2:

  • If a backend process sends a response that doesn’t contain a “Status” header, then Phusion Passenger will crash. This problem is caused by a small typo, and has been fixed.
  • Fixed permission problems which prevents file uploads from working properly when PassengerUserSwitching is turned off.
  • Fixed a Rake-related problem on Ruby 1.9.
  • The gem is now Ruby 1.9-compatible as well, so if you type “gem install passenger” on Ruby 1.9 then it will work.
  • Fixed compilation problems on Linux-Sparc.
  • Fixed compilation problems on NetBSD. Patch contributed by yui.naruse.
  • Fixed compilation problems on AIX. Patch contributed by pedzsan.
  • Fixed “bad file descriptor” problems on x86_64 OS X and ppc64 OS X.
  • Fixed a few problems in the dependency detection part of the installer.
  • Minor improvements in fatal error handling.
  • Documentation improvements.
  • Minor usability improvements in the error pages.

How do I upgrade to 2.1.3?

Via a gem

Please install it with the following command:

gem install passenger

Next, run:

passenger-install-apache2-module

Please don’t forget to copy & paste the Apache config snippet that the installer gives you.

Via a native Linux package

John Leach from Brightbox has kindly provided an Ubuntu 8.04 package for Phusion Passenger. The package is available from the Brightbox repository which you can find
at:

http://apt.brightbox.net

Add the following line to the Third Party Software Sources:

deb http://apt.brightbox.net hardy main

(The simplest way to do that is to create a file in /etc/apt/sources.list.d/ containing the deb instruction, and then run ‘apt-get update’).

Once you’ve done this then you can install Phusion Passenger by running:

apt-get install libapache2-mod-passenger

(Note that John is currently packaging 2.1.3, so it might take a while before this release shows up in the apt repository.)

Final

Phusion Passenger is provided to the community for free. If you like Phusion Passenger, please consider sending us a donation. Thanks!

Hongli Lai Ninh Bui

Phusion Passenger | Comments (6)

Phusion Passenger 2.1.2 (final) released

By Hongli Lai March 13th, 2009

Phusion Passenger is an Apache module for deploying Ruby on Rails web applications, and is mainly focused on ease of use and stability.

Recent changes

Phusion Passenger is under constant maintenance and development. We are pleased to announce Phusion Passenger version 2.1.2. This is a major improvement over the 2.0.x series. Please see the 2.1.1 (beta) announcement for a list of improvements compared to 2.0.x.

Phusion Passenger 2.1.2 final is compatible with Rails 2.3, while older versions of Phusion Passenger are not!

2.1.2′s release was strategically planned for today because Rails 2.3 final is going to be released very soon. So if you’re running any Rails 2.3 apps, then you should upgrade to Phusion Passenger 2.1.2.

The following things have changed since 2.1.1 beta:

Fixed various compilation issues
We fixed many different compilation issues that occur on FreeBSD, NetBSD and (Open)Solaris. Phusion Passenger will now also try harder to autodetect the correct APR install and the correct Apache command tools.
Worked around a restart issue on OpenSolaris
An OpenSolaris-related issue, which causes Phusion Passenger to restart the backend application on every request even when restart.txt doesn’t exist, has been worked around. We suspect that this issue is
caused by a bug in the OpenSolaris compiler toolchain.
Improved fatal error diagnostics
A central part of Phusion Passenger is the ApplicationPoolServerExecutable. If it goes down then Phusion Passenger won’t work anymore until you restart Apache. We’ve gone into great lengths to ensure that this part is stable, but some people report that ApplicationPoolServerExecutable could crash, although the reasons have been unknown so far.

ApplicationPoolServerExecutable will now print a gdb backtrace of itself when it crashes. This allows us to better diagnose potential problems.

Documentation
Documentation has been improved.
Various other small bugfixes
Please read the git commit list for details.

How do I upgrade to 2.1.2?

Via a gem

Please install it with the following command:

gem install passenger

Next, run:

passenger-install-apache2-module

Please don’t forget to copy & paste the Apache config snippet that the installer gives you.

Via a native Linux package

John Leach from Brightbox has kindly provided an Ubuntu 8.04 package for Phusion Passenger. The package is available from the Brightbox repository which you can find
at:

http://apt.brightbox.net

Add the following line to the Third Party Software Sources:

deb http://apt.brightbox.net hardy main

(The simplest way to do that is to create a file in /etc/apt/sources.list.d/ containing the deb instruction, and then run ‘apt-get update’).

Once you’ve done this then you can install Phusion Passenger by running:

apt-get install libapache2-mod-passenger

(Note that John is currently packaging 2.1.2, so it might take a while before this release shows up in the apt repository.)

Final

Phusion Passenger is provided to the community for free. If you like Phusion Passenger, please consider sending us a donation. Thanks!

Hongli Lai Ninh Bui

Phusion Passenger | Comments (2)

Phusion Passenger 2.1.1 (beta) released, thanks sponsors!

By Hongli Lai March 1st, 2009

Phusion Passenger is an Apache module for deploying Ruby on Rails web applications, and is mainly focused on ease of use and stability.

The community sponsorship campaign has been a huge succes. We are proud to announce version 2.1.1 of Phusion Passenger. This version is a beta version, and if we don’t find any serious issues in a few weeks, we’ll release 2.1.2 final (which is not a beta).

We’d like to pay our gratitude to the following people and organizations for sponsoring this release:

What’s new in 2.1.1?

Support for Rails 2.3
The Rack specification has changed in an incompatible way, mainly in order to be Ruby 1.9 compatible. We’ve fixed this in a backwards-compatible manner.
Improved compatibility with other Apache modules, such as mod_rewrite
Phusion Passenger is now fully compatible with mod_rewrite! The “RailsAllowModRewrite” option is now obsolete, and everything should work as expected.

While this might sound like a trivial improvement, please think about this for a moment, because supporting mod_rewrite has been anything but trivial. The way mod_rewrite interacts with Apache is for the most part undocumented. We have spent many, many, many man hours on reading mod_rewrite’s source code, Apache’s source code and many Apache modules’ source code, and reverse engineering its behavior through debuggers, in order to figure out how to make Phusion Passenger fully compatible. To get an idea of how much effort we spent into this, take a look at the Phusion Passenger Apache module source code. Even if you’re not familiar with C++, you might be interested in the comments associated with the following functions: prepareRequest, saveOriginalFilename, saveStateBeforeRewriteRules, undoRedirectionToDispatchCgi, startBlockingModDir, startBlockingModAutoIndex.
The information in all these comments are obtained through hard reverse engineering work, because the behavior that these comments describe are not documented anywhere. We had to obtain this information the hard way.

Ruby 1.9 support
As announced here.
Support for NFS setups
Using Phusion Passenger to deploy applications that live on NFS shares is currently a bit awkward, and performance isn’t that good either because of filesystem access overhead. We’ve made Phusion Passenger more NFS friendly! Performance on NFS shares has been increased by up to 8 times thanks to smart filesystem access caching. Restarting applications that live on NFS shares now works seamlessly.
Various I/O handling and scaling improvements and fixes
Phusion Passenger will now try much harder to enforce I/O timeouts, so that a bad, slow or frozen HTTP client cannot hog server resources forever.

We’ve improved mod_xsendfile support. If a backend process sends an X-Sendfile response, then Phusion Passenger used to keep that backend process locked until mod_xsendfile has sent the file. This has been solved: Phusion Passenger will now immediately release the backend process, making things much more scalable.

Phusion Passenger now fully supports applications that stream large amounts of data. Apache has the tendency to buffer the entire response in memory before sending it to the HTTP client. We’ve suppressed this
Apache behavior, so now your Ruby web application can happily stream hundreds of megabytes of data, and things will keep working smoothly.

Ability to disable Phusion Passenger for arbitrary URLs (PassengerEnabled option)
This allows you to, for example, integrate PHP applications alongside Ruby/Rails applications on the same virtual host.

Improved application compatibility
If your application has a model named ‘Passenger’ then it will not work on Phusion Passenger 2.0.x because that’s how our namespace is called. We’ve renamed our namespace to ‘PhusionPassenger’, so this
problem is now a thing of the past.



Some applications are incompatible with Phusion Passenger’s smart spawning mode, and have to be deployed in conservative spawning mode. As you might know, smart spawning can reduce a Rails application’s
startup time by as much as 90% in the right circumstances, as well as decreasing its memory usage, so it’s no surprise that smart spawning is preferred over conservative spawning. We’ve added various hooks which
allows developers of incompatible applications to make their applications compatible with smart spawning.

Phusion Passenger depends on the ‘rack’ gem in order to support Rack applications. The latest ‘rack’ gem is version 0.9.1, but some applications have (incorrectly) specified a hard dependency on rack 0.4.0. If both 0.9 and 0.4 are installed, then these applications will break when run in Phusion Passenger, because the application tries to load 0.4 after 0.9 has already been loaded. We’ve implemented a fix so that even these applications will now work correctly.

Better cross-platform support
MacOS X support as well as support for 64-bit platforms have been much improved. Sun Solaris is now officially supported, thanks to contributions by Alex Osborne, Jacob Harris, alex.kiernan, Alex Tomlins
and J Aaron Farr.
Non-interactive installer
The installer can now be run in non-interactive mode, ideal for scripting. Use the –auto command line option.
Improved command-line admin tools
For example, the ‘passenger-status’ tool now displays additional useful information such as a worker process’s uptime and how many requests it has processed so far.
Ability to display backtraces for all threads
If you’re using the latest version of Ruby Enterprise Edition, or if you’re using a Ruby interpreter with the caller_for_all_threads patch, then Phusion Passenger gives you the ability do dump the backtraces of all running threads to a log file. This makes it much easier to debug multithreaded web applications.
Improved security
We’ve taken various precautions in order to improve overall security. For example, if user switching is disabled, then all Phusion Passenger helper daemons will be run as non-root (they must be root for
user switching to work). Temp directory permissions have been tightened to prevent malicious tampering.
More customization options for exotic systems/setups
It is now possible to customize the ‘tmp’ directory that Phusion Passenger uses. This is especially useful on systems on which Apache can’t write to /tmp (e.g. on many systems with SELinux), or systems on
which /tmp is not a good candidate for temporary files for whatever reason. It’s now also possible to customize the directory in which Phusion Passenger looks for ‘restart.txt’. Global queuing usage can now be customized per-virtual host. It’s now possible to explicitly specify the location of the web application’s root directory, in case DocumentRoot + “/..” is not the correct directory.
Various usability improvements
In particular, many error messages have been improved so that end users don’t have to stare at the screen for minutes wondering what the computer is trying to tell them. There are also many small usability
improvements here and there.
Various other minor improvements and bug fixes
PassengerPoolIdleTime can now be set to 0, which means that the backend application must never idle timeout. This feature has been contributed by redmar.
The passenger-status tool will now display Phusion Passenger’s own backtraces for C++ code, in order to make it possible to detect potential freezes in C++ code.
Phusion Passenger error pages now return HTTP 500 errors, as they should.
The ApplicationSpawner server and FrameworkSpawner server idle times can now be customized.
In the 2.0.x series, sometimes more backend processes might be spawned than is allowed by the ‘PassengerMaxPoolSize’ option. This has been fixed.

How do I upgrade to 2.1.1?

Please download the 2.1.1 gem, then install it with the command:

gem install passenger-2.1.1.gem

Next, run:

passenger-install-apache2-module

Please don’t forget to copy & paste the Apache config snippet that the installer gives you.

You cannot type just “gem install passenger” because this gem isn’t uploaded to RubyForge. We didn’t upload it to RubyForge because this is a beta release.

You can also download the source code if you prefer that instead.

Enjoy!

Hongli Lai Ninh Bui

Phusion Passenger | Comments (2)