Phusion white papers Phusion overview

Phusion Passenger 2.0.4 released; 37signals’s Ta-da List now using Passenger

By Hongli Lai on December 1st, 2008

Phusion Passenger is an Apache module for deploying Ruby on Rails web applications, and is mainly focused on ease of use and stability. Since its first release in April 2008, it has gained quite a lot of attention from the Rails community, and nowadays it has become a very popular deployment tool.

Tobias Lütke has recently announced that Shopify is now running Phusion Passenger:

“In conclusion: I cannot see any reason to choose a different deployment strategy at this point. Its simple, complete, fast and well documented.” —
Tobias Lütke

Even 37signals is now using Phusion Passenger. They’ve recently announced that they’ve switched Ta-da List to Phusion Passenger:

“We’re really impressed with the ease of deployment and stability under Passenger. The app now requires less than 10 lines of configuration to launch and deploy.” — Joshua Sierles

Recent changes

Phusion Passenger is under constant maintenance and development. We are pleased to announce Phusion Passenger version 2.0.4. This is mainly a bugfix release, but contains one new feature. The changes are as follows:

Global queuing
We recently announced that we’ve developed a feature called global queuing. This feature was requested by 37signals. When global queuing is on, Phusion Passenger will load balance all incoming requests into the first available backend process. This is especially useful if you have long-running requests, e.g. requests that perform heavy calculations and can take several seconds to finish. See this blog post for a more detailed description.

This feature is included in Phusion Passenger as of version 2.0.4.

Fixed compatibility with the latest Rake version and RubyGems version
When compiling Phusion Passenger using the latest Rake, compilation commands are not shown while various warnings are being shown. This has been fixed. Various RubyGems deprecation warnings have also been fixed.
Running background programs from within the Rails app won’t freeze the request
In previous versions of Phusion Passenger, if one executes
system("sleep 10 &")

from within the Rails app, then Phusion Passenger won’t finish the request until 10 seconds have gone by. In other words, Phusion Passenger would wait until the background program has finished. This issue is caused by file descriptor leaks, and has been fixed.

Fixed Mac OS X crash
A Mac OS X related crash has been fixed.
Various bug fixes
The title says it all. If you experienced any kind of problems with previous releases, please try this release as the bug may have been fixed.

How do I upgrade to 2.0.4?

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.0.4, 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
  • Jochen kaechelin

    So, can PP replace backgroudrb for example to execute some long running tasks like big csv imports?

  • http://davidsmalley.com David

    Excellent work guys – I’d been running this version from source since you first announced global queuing and I’m very impressed so far. I’ve not deployed an nginx+mongrel app server for a while now :)

    Did you ever get the whole “request.ssl?” issue fixed? http://code.google.com/p/phusion-passenger/issues/detail?id=140

  • http://www.phusion.nl/ hongli

    @David: I’m not sure whether it’s even a Passenger issue. See my comment in the issue tracker.

  • http://www.atnan.com Nathan de Vries

    Thanks for your hard work, guys. This has made my deployment *so* much more simple for us (used to be using Nginx + Mongrel, until we realised neither were HTTP 1.1 compliant and could not accept chunked POST requests), and on top of that we can now use all of the great modules Apache has accumulated over the years.

    Keep up the great work.

  • Pingback: Brightbox Blog - Ruby on Rails Hosting - Passenger 2.0.4 packages for Ubuntu()

  • richy
  • http://pragmatig.wordpress.com grosser

    Capistrano script to handle this automagically, just run cap install_passenger and your done, for any version

    http://pragmatig.wordpress.com/2008/10/10/capistrano-recipe-to-install-or-update-passenger/

  • Pingback: New version (2.0.4) of Phusion passenger/mod rails out()

  • http://craigjolicoeur.com Craig

    Excellent work guys. Glad to see the global queue option

  • http://www.strictlyuntyped.com Matthew Higgins

    After upgrading to 2.0.4 and turning PassengerUseGlobalQueue on, something broke down after 15 hours. The following error turned up when Apache went down:

    [error] server reached MaxClients setting, consider raising the MaxClients setting

    When trying to restart apache, errors like this showed up:

    [warn] child process 27420 still did not exit, sending a SIGTERM
    ….

    These processes were spawn by Passenger. This is an ubuntu 8.10 server with the latest gems, packages, etc. It seems convincing that either 2.0.4 or the new PassengerUseGlobalQueue caused this problem.

  • Pingback: Passenger 2.0.4 Released: Now With Global Queuing and Background Process Support()

  • http://wakoopa.com Menno

    Grats with this release. We’re planning on migrating very soon as well.

    What is the status of the REE-1124 release? I saw a blogpost of the release appear somewhere but it appears to have been pulled. Is the current release-branch stable enough to use with Passenger?

    Thanks and keep up the good work.

  • http://www.phusion.nl/ hongli

    Menno: REE will be released very soon. It’s almost ready.

  • Chris

    Why don’t the phusion passenger guys care about Solaris compatibility?

  • http://www.phusion.nl/ hongli

    @Chris: We don’t get paid for implementing Solaris support.

    That said, people have contributed Solaris support and it’s in the development version.

  • Mathijs Kwik

    I can confirm Matthew Higgins’ report.
    When turning Global Queueing on, apache crashes.
    It can be triggered in under 10 seconds when using passenger-stress-test.

    What seems to happen is that requests land up in the global queue while some ruby processes don’t exit (or don’t notify passenger or something). Apache then at some point won’t accept more connections, hence the maxclients error in the log.

    Killing apache the normal way doesn’t work very well. It needs a killall on my system, and even then it takes 15 sec. the logs show that apache is waiting for some child processes to shut down.

    This happens on 2 of our production systems. They both run ubuntu server 8.04 on 64-bit.
    I turned the global queue back off as soon as I noted the error, but I would like to use this feature.

    If I can help by providing some apache logs I will gladly help.

    For the rest… keep up the great work!

  • http://www.phusion.nl/ hongli

    @Matthijs, Matthew: We’ve already identified and fixed the problem. It only occurs when using global queuing in combination with the worker MPM. The bug fix is already in git and we’ll release a new version soon.

  • Marius

    Is there any downside to global queueing?

  • http://www.phusion.nl/ hongli

    Yes. It’s documented in the manual.

  • http://www.sunsethost.com/Ruby-On-Rails.php Ruby On Rails With Mod Rails

    We are currently on 2.0.4 it was an easy upgrade. BTW great work guys.

  • Marius

    Ok, so there is something like a 5% performance penalty for using global queueing. Why is that? Is that explained somewhere?

  • http://www.phusion.nl/ hongli

    @Marius: We suspect that the 5% penalty is caused by context switching overhead and waiting. It’s like standing in front of a line in the supermarket. Compare global queuing with having multiple counters and a single door which gives access to all the counters. Everybody is queued behind this door. Whenever a cashier is done, he opens the door and calls “next person please!”. There’s a little delay involved in opening the door, communicating with the next person, and walking back to the counter.
    There is no such delay if there is one door for each counter (= global queuing off). But there’s a wall between each counter, and the door can only be opened from the outside, so once you step into a door you cannot go to another counter even if the other counter doesn’t have a queue.

  • Marius

    Thank you hongli!

  • Pingback: - Passenger 2.0.4 Released: Now With Global Queuing and Background Process Support -325i.org()