Phusion, The Computer Science Company | Chamber of Commerce no 08173483 (Apeldoorn, The Netherlands) | info@phusion.nl

Phusion Passenger™ 2.0 RC 1 and Ruby Enterprise Edition released

It’s a little bit late (this should have been done during RailsConf, sorry), but it’s finally here. We’re pleased to announce Phusion Passenger 2.0, release candidate 1. :D If no major issues are found, this will become version 2.0.1. We’re also pleased to announce the long-awaited Ruby Enterprise Edition.

RailsConf 2008 presentation

Our RailsConf 2008 presentation about Phusion Passenger and Ruby Enterprise Edition went extremely well. The sheets are available in the following formats:

The presentation includes a screencast (23 MB) created by Soocial.

Some people have been distributing our old, outdated sheets, which contain lots and lots of bullet points and almost no graphics. Please download the sheets on this page instead: these are the sheets that we used during the presentation.

Introducing Rack support

2 months after the release of Phusion Passenger 1.0, we present you with Rack support. It is now possible to host arbitrary Ruby web applications (e.g. Merb and Camping) on Phusion Passenger! We provide this feature with the same ease of use that many people have come to love.

The following screencast, created by Ryan Bates of RailsCasts fame, demonstrates the ease of deploying a Rack application on Phusion Passenger:

But that’s not all. We’ve done our homework. Our Users guide provides a comprehensive list of Rackup specifications for all Ruby web frameworks that we could find, so that you don’t have to hunt this information down yourself!

We received some Rack-related contributions shortly after Rack support had been pushed to the public git repository. We’d like to thank _why and remi for contributing documentation and full Rackup DSL support.

Introduction Python WSGI support

Not only do we support Rack, we now also support Python WSGI! In theory, Phusion Passenger can now run Django.

Don’t get us wrong. Phusion Passenger’s main focus is still on Ruby and Ruby on Rails. WSGI support is meant to be a show case of Phusion Passenger’s flexible architecture.

Optimizations

Much better stability
This new release is much more stable than the 1.0.x series. Many stability issues have been fixed. In fact, Dreamhost and iLike are using this version in production environments. So if you were experiencing stability problems, please upgrade to this version, as it may solve your problem.
Much faster graceful restart
Some hosts gracefully restart Apache often, so to them, high graceful restart speed is essential. Phusion Passenger 2.0 RC 1 is much, much faster at graceful restarts.
Less memory usage: reduced VM size

Process monitoring tools tend to use the “VM size” of a process as an indication of the actual memory usage. This is not correct, because the VM size only indicates the amount of memory that a process can access, not the amount of memory that it actually uses.

Nevertheless, having a large VM size poses problems. Some servers, virtual private servers in particular, have artificial VM size limits in order to prevent processes from using too much memory. Phusion Passenger 1.0 makes Apache’s VM size very large (more than 100 MB), even though the actual memory usage is only several MB.

In Phusion Passenger 2.0, the VM size has been reduced by ten fold, as shown by the following diagram:

Fair load balancing (as opposed to round-robin load balancing)

One of the traditional problems of Mongrel Cluster behind Nginx is, in Ezra’s words:

“My only complaint was that the proxy modue was round robin only. This means that if you had 3 mongrels and one of them performed and action that took say 20 seconds, for that 20 seconds every 3rd request would get stuck in line behind the mongrel doing the long blocking request. This is because nginx was merrily doing round robin and didn’t care if a mongrel was busy or not.”

Phusion Passenger now supports fair load balancing. It will forward a request to the Rails instance with the least number of requests in its queue. Fair load balancing is turned on by default, without the need to configure anything.

See also page 53 of the presentation sheets.

Upload buffering

In Phusion Passenger 1.0, a (long) file upload will block a Rails application instance. Usually this is not a big problem, because Phusion Passenger will spawn more Rails instances if existing ones are blocked. But it becomes a problem if your website handles many simultaneous file uploads (read: more than 10 concurrent file uploads at any time).

Phusion Passenger 2.0 supports upload buffering. File uploads that are sufficiently large, are stored into a temporary file. Only when the file upload is done, will it be forwarded to the Rails application. This means that your Rails applications will not be blocked while a large file upload is in progress.


See slide 86 of the presentation sheets.

Default timeouts changed, in favor of virtual private servers

The default timeout values in Phusion Passenger 1.0 were optimized for shared hosts, which host many applications and need to free resources quickly. But most of our users seem to be using virtual private servers. These servers usually don’t get a lot of traffic, so the default timeouts are easily reached. So we’ve changed the default timeout values in favor of virtual private servers. Shared hosts and people running Phusion Passenger on dedicated servers should adjust the timeouts.

What Default in Phusion Passenger 1.0 Default in Phusion Passenger 2.0
RailsMaxPoolSize 20 6
RailsPoolIdleTime 120 300
ApplicationSpawner server idle time 120 600

Other improvements

Ruby on Rails 1.0 compatibility
Phusion Passenger is now compatible with Rails 1.0 applications as well.
Improved application compatibility: conservative spawning

By default, Phusion Passenger preloads the Ruby on Rails framework and application code. This allows Phusion Passenger to reduce the startup time of Ruby on Rails applications and to save memory. Using this technique, startup time can be decreased by as much as 90%!

Unfortunately, some applications and/or plugins don’t expect to be preloaded, and even assumes that no code is being preloaded. soap4r is one such plugin. Until recently, these applications/plugins didn’t work with Phusion Passenger.

Phusion Passenger 2.0 implements so-called conservative spawning. In conservative spawning mode, Phusion Passenger will not preload any code. In other words, it will emulate the way Mongrel loads Rails applications. Conservative spawning allows Phusion Passenger to be 100% compatible with all Rails applications.

Conservative spawning is less efficient than the default spawning strategy, though no less efficient than Mongrel Cluster. You should only use conservative spawning if you’re experiencing compatibility problems.

‘RailsEnv’ is now per-virtual host
The RailsEnv configuration option used to be a global option. It’s now a per-virtual host option, so you can define a different environment for every Rails application.
New resource control option: ‘PassengerMaxInstancesPerApp’

The PassengerMaxInstancesPerApp option allows you to define the maximum number of pool slots that a single application may use. This will prevent a single application from getting out of control and taking over the entire server.

Many thanks to Jochen Tuchbreiter for contributing this feature.

Support for worker MPM
The Apache worker MPM is now supported.
Analysis and system maintenance tools
Phusion Passenger 2.0 includes new analysis and system maintenance tools. If you’re experiencing stability problems with Phusion Passenger or your Rails application, then please try these tools.

How do I upgrade to 2.0 RC 1?

Via a gem

Please download the 2.0 RC 1 gem, then install it with the command:

gem install passenger-1.9.0.gem

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

Neil Wilson 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 anstruction, 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

Finally, run the following command. This will tell you how to configure Apache.

passenger-install-apache2-module

Ruby Enterprise Edition

Ruby Enterprise Edition has been officially launched. Check out http://www.rubyenterpriseedition.com/

So far, Ruby Enterprise Edition has mostly been tested on Linux (both 32-bit and 64-bit). MacOS X is not yet supported: support for it is planned for a future version.

That’s all folks

A lot of work has been put into this release. Enjoy. :) If you like our work, please consider getting an “enterprise license”. ;)

44 Comments »

  1. Congratulations guys. You are doing fantastic work.

    Comment by Ethan — June 9, 2008 @ 5:07 pm

  2. Awesome! At last :-D

    Comment by AkitaOnRails — June 9, 2008 @ 5:12 pm

  3. Oh, give Leopard top priority on your list :-) rsrsrs

    Comment by AkitaOnRails — June 9, 2008 @ 5:12 pm

  4. Great news! This is a sweet release. Thanks :)

    Comment by Jeremy Kemper — June 9, 2008 @ 5:17 pm

  5. Awesome! Testing this now!

    Comment by j4s0n — June 9, 2008 @ 5:24 pm

  6. Great!

    Thank you so much!
    My next web app will surely be deployed on passenger2!

    Keep up the great work!

    Comment by Stefano Bernardi — June 9, 2008 @ 5:32 pm

  7. Wow. We use mod_rails for our production stuff and this makes it only better. Much thanks.

    -R

    Comment by roger degree search — June 9, 2008 @ 5:38 pm

  8. Great release! So many new features and improvements in such little time.

    Comment by Tom — June 9, 2008 @ 5:40 pm

  9. Hi all, thank you for the kind words!

    @Tom:
    Are you going to be at RubyEnRails tomorrow? If so, I’d be able to bring you your shirt with me :-)

    Cheers,
    Ninh

    Comment by Ninh Bui — June 9, 2008 @ 5:43 pm

  10. Cool! Congrats

    Comment by Rodrigo Kochenburger — June 9, 2008 @ 5:46 pm

  11. Cool features! The installation process is simple, great work.

    Thanks!

    Comment by Felipe — June 9, 2008 @ 7:28 pm

  12. Nice, I was waiting for this! Much faster!

    Comment by Rikas — June 9, 2008 @ 8:28 pm

  13. doesn’t look to compile on my mbp running leopard. i’ll wait for v2.0 proper to come out.

    Comment by bryanl — June 9, 2008 @ 8:41 pm

  14. Congrats on the release! 1.0 was looking very promising already, and 2.0 looks even better. Can’t wait to try this with both Rails and Merb.

    Comment by Mirko — June 9, 2008 @ 11:23 pm

  15. [...] 2.0 RC1 has been released, and you can find more details in the release announcement on the Phusion blog. In addition to Rack and WSGI support, 2.0 sounds like a more solid and stable release overall, [...]

    Pingback by DigitalHobbit » Blog Archive » Phusion Passenger Now Rack Compatible? — June 9, 2008 @ 11:33 pm

  16. Great work! I’m now using Passenger for the development server for all of my Merb apps. I’ve also created a page on the Merb wiki for Passenger: http://wiki.merbivore.com/pages/phusion-passenger

    On another note, I’d love to see someone investigate LiveConsole integration so that we can get ruby-debug back.

    Comment by meekish — June 10, 2008 @ 12:34 am

  17. Great Job.

    I’m sure it’s becoming the best friend of every rails developer :) . Thumbs up!

    Comment by Stanislav Bozhkov — June 10, 2008 @ 1:32 am

  18. You don’t need to run the installer when you install via the Ubuntu Package. It’s all taken care of by the package.

    All you need do to get your site up and running is to create a Virtual Host config in /etc/apache2/sites-available and enable it with ‘a2ensite’ in the usual Apache fashion. Just a ServerName and a DocumentRoot entry and your Rails app is up.

    Comment by Neil Wilson — June 10, 2008 @ 2:46 am

  19. [...] you’ve been following the buzz from RailsConf 2008 you’ll know that Phusion Passenger has gone to version 2.0 with a whole load of new goodies [...]

    Pingback by Brightbox Blog - Ruby on Rails Hosting - Phusion Passenger Package update to 2.0 RC1 — June 10, 2008 @ 5:05 am

  20. @ninh, Unfortunately, I’m at the UU tommorrow we have some deadlines to catch :( , have fun at Ruby en Rails 2008!

    Comment by Tom — June 10, 2008 @ 5:31 am

  21. I deployed passenger-1.9 on my production server, however the apache processes are still eating up to 260MB VM memory.

    Also I have problems with Ruby-Enterprise http://groups.google.com/group/phusion-passenger/browse_thread/thread/b2c1bbc046249ac6# .

    Cheers

    Comment by Stanislav Bozhkov — June 10, 2008 @ 6:45 am

  22. perfect.

    Comment by claudemiro — June 10, 2008 @ 12:20 pm

  23. [...] As a side note, Phusion Passenger 2.0 RC 1 has also been released with support for Rack and pratically every major framework on rails. More info at their blog. [...]

    Pingback by Ruby Enterprise Edition | jonRaptor's Blog — June 10, 2008 @ 12:30 pm

  24. Wow good work guys, keep it up. I am amazed at how fast this project has been progressing. It looks like, I will have to change the current setup of my two deployed apps. I really love the completely fair scheduler, as I have run into the long waiting mongrel issue a bunch. We ran various admin tasks to generate reports that could take about a minute and a half, and the stall to the production pool was really the only problem.

    Congrats!

    Comment by Dan Mayer — June 10, 2008 @ 6:46 pm

  25. [...] Phusion Passenger 2.0 RC1 and Ruby Enterprise Edition Released – More news from the Phusion folks. [...]

    Pingback by A Fresh Cup » Blog Archive » Double Shot #227 — June 11, 2008 @ 5:51 am

  26. [IT]Phusion Passenger (mod_rails) 2.0 RC1 が公開されています…

    早くもPassenger(mod_rails)のバージョン2.0RC1が公開されています。 かなり魅力的な変更点が多く、そろそろ本格的に使い始めたくなってきました。 Passenger(mod_rails)2.0RC1での主な変更点 Rackのサ…

    Trackback by RX-7乗りの適当な日々 — June 11, 2008 @ 9:02 am

  27. Passenger 1.0.5 works great for me, but when I tried to upgrade to 2.0 RC 1, it gives me this error: http://pastie.org/private/brpmpq5ijvusk3xc6oxtcw

    Comment by Ray — June 11, 2008 @ 12:32 pm

  28. [...] branded as passenger). There was a lot to be excited about in their talk. They talked about the release candidate features. But one of the most obvious (after you hear it) features was buffering file uploads. So, [...]

    Pingback by Simpltry » Blog Archive » The 3 Coolest things I saw at RailsConf — June 11, 2008 @ 12:43 pm

  29. Ray: That’s a compiler bug. A workaround has already been committed to git.

    Comment by hongli — June 11, 2008 @ 1:23 pm

  30. [...] Check it out. The guys from Phusion made a whole slew of improvements in Passenger. 2.0 RC1 has a ton of optimizations and new features, including support for frameworks other than Rails. Their custom version of Ruby, “Ruby Enterprise Edition,” has also been released. Definitely worth considering for your next deployment, as the combination of the two should lead to some significant improvements in memory utilization. [...]

    Pingback by thebalance » Blog Archive » Passenger 2.0 RC1 — June 11, 2008 @ 1:30 pm

  31. Thanks hongli. The version in “GitHub”:http://github.com/FooBarWidget/passenger/tree/master works perfectly. Can’t wait for the 2.0.1 gem.

    Comment by Ray — June 11, 2008 @ 4:56 pm

  32. [...] development should familiarize themselves with mod_rails aka Phusion Passenger as the brand new v2 RC is just amazing. Just take a look at those improvements: from buffered uploads so apps don’t get stuck, to a [...]

    Pingback by Mc-Kenna.com » mod_rails 2 RC is out, get it! — June 11, 2008 @ 5:06 pm

  33. [...] guys at phusion have been hard at work improving mod_rails and a release candidate for 2.0 is now available. This includes: rack support; faster graceful restarts; less memory usage; fair [...]

    Pingback by Passenger/mod_rails 2.0 RC1 | tekin.co.uk — June 12, 2008 @ 1:08 am

  34. any chance to get ruby ent working on freebsd amd64 platform ?
    right now it’s not possible due to libunwind compilation problems

    Comment by booyo — June 12, 2008 @ 6:15 am

  35. I can’t seem to get the 2.0 RC1 to work with the Ubuntu package mentioned. It won’t run the installer. I get-bash: /usr/bin/passenger-install-apache2-module: No such file or directory. I saw the OP saying it wasn’t needed, but then how do you get the configuration files to load the module in Apache? Thanks….

    Comment by Tom_Mancino — June 13, 2008 @ 3:59 pm

  36. The gem doesn’t seem to exist?:

    Bulk updating Gem source index for: http://gems.rubyforge.org
    ERROR: While executing gem … (Gem::GemNotFoundException)
    Could not find passenger-1.9.0.gem (> 0) in any repository

    Comment by Alan — June 16, 2008 @ 9:45 am

  37. [...] Passenger 2.0 rc1 and ruby enterprise releasedAdded on 06/10/2008 at 09:43AM Sphere: Related Content [...]

    Pingback by ProjectX Blog » Blog Archive » Xlinks Digest - 17 / 06 / 2008 — June 16, 2008 @ 2:34 pm

  38. [...] You can see the list of original improvements here [...]

    Pingback by mod rails Passenger 2.0 RC2 released … even more stable? — June 16, 2008 @ 4:09 pm

  39. @ Alan … you have to download it first :P
    The same thing happened to

    wget http://phusion-passenger.googlecode.com/files/passenger-1.9.0.gem

    Comment by austin_web_developer — June 16, 2008 @ 4:10 pm

  40. [...] Passenger 2.0 RC 1 and Ruby Enterprise Edition Released: The guys at Phusion have unveiled a release candidate of Passenger 2.0 (now supporting Rack) as well as Ruby Enterprise [...]

    Pingback by The Best of RubyFlow - Early June 2008 — June 16, 2008 @ 7:41 pm

  41. Thanks for the mention :P I hope to find some time to get the specs working and test-drive even better Rack support.

    You. Guys. Rock. :)

    Comment by remi — June 17, 2008 @ 1:06 am

  42. And Leopard? :-)

    Comment by Tapajós — June 17, 2008 @ 6:51 am

  43. [...] I’m excited with developments like Phusion Passenger which also markets a Ruby VM they call Ruby Enterprise Edition, probably hoping to be the Zend (not Zed) of [...]

    Pingback by reasons for not using Rails « ONE SHORE INC — June 19, 2008 @ 5:19 pm

  44. [...] the upcoming release of mod_rails 2.0 and Ruby Enterprise, things are looking even better. The list of enhancements to mod_rails is huge, and even Ruby [...]

    Pingback by Filler » mod_rails (Phusion Passenger) Second Impressions — June 23, 2008 @ 11:21 am

Leave a comment