Phusion Passenger 3.0.0 public beta 1 is out!
Phusion Passenger is software with which one can deploy Ruby web applications on the Apache or Nginx web server. Now, with the release of version 3.0.0 beta 1, it also comes with a standalone version that does not require an external web server. Please read http://www.modrails.com/ for details.
In the past period we’ve blogged extensively about the progress of Phusion Passenger 3. Many exciting changes have been introduced. It’s been a long ride, but today we are happy to announce the first Phusion Passenger 3 public beta! We’ve already tested Phusion Passenger 3 extensively in private, and now we’re giving the community a chance to test it as well in order to make the final release rock-solid.
We’ve received a lot of emails from people who are excited about Phusion Passenger 3. Thank you all for your support!
To recap, we’ve described Phusion Passenger 3 extensively in our past Technology Preview articles:
- Technology Preview 1: Performance
Phusion Passenger 3 can be up to 55% faster than Phusion Passenger 2.2. - Technology Preview 2: Stability, robustness, availability, self-healing
We’ve implemented many safeguards to keep Phusion Passenger stable and running as much as possible. - Technology Preview 3: Closing the gap between development and production & rethinking the word “easy”
Describes how Phusion Passenger’s usage model differs from Mongrel’s, Thin’s and Unicorn’s and when one would prefer our model over the other and vice versa.
Introduces Phusion Passenger Standalone (formerly called Phusion Passenger Lite) which can be used as a potentially improved replacement for Mongrel, Thin and Unicorn. - Technology Preview 4: Adding new features and removing old limitations
Except for mass deployment, all features described in the technology previews are available as open source in Phusion Passenger 3. A few more changes have been made since the last Technology Preview:
- The ‘PassengerPreStart’ option
- In Technology Preview 4 we described PassengerMinInstances. That option ensures that, at least x instances will be kept around once they’ve been spawned, but it does not ensure that instances are immediately spawned up during web server start. Instead we have a separate configuration option for that, called PassengerPreStart. PassengerPreStart and PassengerMinInstances and the reason why they’re separate configuration options are described extensively in the manual.
- RVM support
- RVM is becoming more and more popular. Previous versions of Phusion Passenger work fine with RVM, but one has to follow special installation instructions for it to work properly. We’ve noticed that many users are not aware of this and as a result couldn’t get Phusion Passenger working properly with RVM. In Phusion Passenger 3 we’ve collaborated with Wayne E. Seguin and added special support for RVM so that everything should work out-of-the-box, without special installation instructions.
Other minor changes
For completeness, here are a list of minor changes that have not been described in the Technology Previews so far:
- Nginx is now compiled with SSL support by default.
- Nginx can now be compiled on a noexec /tmp filesystem. Fixes bug #380.
- Support for Nginx 0.8.
- Dropped support for Nginx 0.6.
- Much better Ruby 1.9.2 support. Our unit test suite has been refactored; Ruby 1.9.2 passes our unit test suite 100%.
- The PassengerFriendlyErrorPages option has been added. This allows you to turn off the friendly error pages that Phusion Passenger normally displays in the event of an error, so that only a standard 500 error page is shown. This is documented in the manual.
- The PassengerDebugLogFile option has been added. This is documented in the manual.
- User switching support has been made more flexible through the PassengerUser, PassengerGroup, PassengerDefaultUser and PassengerDefaultGroup options. These are documented in the manual.
- RailsSpawnMethod has been renamed to PassengerSpawnMethod because we now support smart spawning for Rack apps as well.
- passenger-install-apache2-module and passenger-install-nginx-module can now be run concurrently without the one deleting files compiled by the other.
- #at_exit blocks are now called during application process shutdown.
- passenger-install-apache2-module now supports a –snippet option. When this option is given, the command outputs the Apache configuration snippet that should be pasted, but doesn’t do anything else.
- Temporary files that Phusion Passenger places in /tmp are touched every 6 hours. This prevents /tmp cleaner daemons that are present on many systems from deleting these temp files that are essential for Phusion Passenger’s functioning. Bug #365.
Install
Installation is almost the same as Phusion Passenger 2. Type:
gem install passenger --pre
If you want to install the Apache or Nginx version, then run the installer as you’re used to:
passenger-install-apache2-module passenger-install-nginx-module
Or you can download the tarball.
If you want to run Phusion Passenger Standalone, then run:
cd /path-to-your-app passenger start
The documentation
Users guide for Apache
Users guide for Nginx
Users guide for Standalone
Things to come
Although Phusion Passenger 3.0 brings many exciting improvements, it is only the beginning. In parallel to Phusion Passenger 3, we have been working on some interesting things which we plan to reveal to the world shortly after the release of Phusion Passenger 3.0. Please stay tuned for future developments.

Phusion. All rights reserved.
Hey,
The documentation linked in this post is 404 not found.
you are rock, guys!
Great news!
Awesome
(btw, the documentation links are broken here)
Thanks a bunch!
Will 3.0 allow for different rubies for apps on the same server?
Awesome guys! Do you have any plans for Env vars, ala Apache’s SetEnv? I read on the mailing list it was planned for Passenger 3…
This is awesome.
A question about the rvm support: I assume this only works for gemsets, and not different ruby versions, am I correct in this assumption?
This is great news! Just tried passenger standalone on my mac and it works great.
I’ve found a small buglet: passenger standalone doesn’t echo any STDERR output to the console. My app uses a StdErrOutputter from log4r that helps me see the log output in development mode without having to explicitly tail the logs.
But STDERR seems to be ignored when running under passenger standalone.
Great work all around on passenger, can’t wait for the 3.0 stable release!
Regards,
Lee.
Been staring at your RSS feed every morning waiting for this announcement. Thanks!
I was initially going to ask about rvm multi-ruby support, but I guess one way around this now is to use a passenger standalone and bind it to a socket, then use nginx normally to proxy onto the standalone instance. A LOT less nginx configuration as you can hand off the entire request to the standalone instance and not worry about different asset rules.
Great stuff! However I can’t find PassengerDebugLogFile described in the manual anywhere…
Huzzah! Testing it out now on my less important Rails 3 apps
[...] giving the community a chance to test it as well in order to make the final release rock-solid. Link – Trackbacks Share and [...]
I can’t make the Mass Deploy feature to work, its already working on this preview? Someone else tried it and worked?
@Wilker:
“Except for mass deployment, all features described in the technology previews are available as open source in Phusion Passenger 3.”
@Justin Mazzi: Race condition. We were uploading the docs back then and you were faster than our rsync. Should work now.
@Felipe Coury: SetEnv on Apache should have worked since 2.2.
@Lee Mallabone: STDERR should work. Please feel free to file a bug if it doesn’t work for you.
@Tom-Eric: it locks into whatever RVM Ruby and gemset you were using during install time.
@Remear: yes, see comment by Paul Bowsher. We do have plans to have it seamlessly integrated into the Apache and Nginx version as well for a future release.
@Mark Mulder: It’s there. http://www.modrails.com/documentation/Users%20guide%20Apache%203.0.html#_passengerdebuglogfile_lt_filename_gt
@Hongli I know
, I was talking about general support for env vars per v-host, regardless of which webserver you’re using (nginx OR apache).
I am talking about this thread:
http://groups.google.com/group/phusion-passenger/browse_thread/thread/216040342e546e90/4112bc3f3e62fe25?lnk=gst&q=env+vars#4112bc3f3e62fe25
I’m so used to creating vhosts on my dev machine. It will be a breath of fresh air to simply start an app from Rails.root and know that I’m not snuggling with webrick
Mr. Hernandez would be proud. Awesome work, guys, thank you very much! I’ll give it a spin on Solaris soon.
- Johannes
Just exited to try it but I’m experiencing an installation problem under centos5.5 (http://groups.google.com/group/phusion-passenger/browse_thread/thread/163dff6d1fa50e90)
Hongli, RE rvm, I assume you are talking about the RVM ruby and gemset that was active when _passenger_ was installed, right? Have you considered/it is possible to allow some kind of per-app setting for which RVM ruby/gemset to use?
@Carl Youngblood: Yes when Passenger was installed, though only for Passenger-Apache and Passenger-Nginx. Passenger Standalone uses the RVM Ruby and gemset that’s currently active in the shell.
Per-app setting is planned for the future. For now you can also do it by running multiple Passenger Standalone instances, each with its own Ruby interpreter.
i’m using now passenger 3 in my project, when i’m using passenger start, put in my bash one error.
Installing Phusion Passenger Standalone…
[******************************* ] Compiling Phusion Passenger…
*** ERROR: the following command failed:
mkdir -p ‘ext/phusion_passenger/ruby-1.9.2-i686-linux’
cd ‘ext/phusion_passenger/ruby-1.9.2-i686-linux’ && /home/herminio/.rvm/rubies/ruby-1.9.2-rc2/bin/ruby ‘/home/herminio/Área de Trabalho/rubylearning/rails_projects/sample_app/passenger-standalone/3.0.0.pre1-i686-ruby1.9.2-linux-gcc4.4.3-1002/support/ext/phusion_passenger/extconf.rb’
checking for alloca.h… *** /home/herminio/Área de Trabalho/rubylearning/rails_projects/sample_app/passenger-standalone/3.0.0.pre1-i686-ruby1.9.2-linux-gcc4.4.3-1002/support/ext/phusion_passenger/extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
@Herminio: Maybe it’s the space in your path. Try it in a path without spaces.
Your bug links for 365 and 380 are transposed.
Wow, so great!
(btw– you got the references to the two tickets mixed up)
look
Installing Phusion Passenger Standalone…
[******************************** ] Preparing Nginx… \
checking for OS
+ Linux 2.6.32-21-generic i686
checking for C compiler … found but is not working
./configure: error: C compiler gcc is not found
*** ERROR: command failed: sh ./configure ‘–prefix=/home/herminio/.passenger/standalone/3.0.0.pre1-i686-ruby1.9.2-linux-gcc4.4.3-1002/nginx-0.7.67′ –without-pcre –without-http_rewrite_module –without-http_fastcgi_module ‘–add-module=/home/herminio/.passenger/standalone/3.0.0.pre1-i686-ruby1.9.2-linux-gcc4.4.3-1002/support/ext/nginx’
Is smart spawning also available for the standalone passenger start? When I touch tmp/restart.txt it still takes a while for a new request to get served.
Hey, I have somewhat similar output as Hermino, but due to uname behaviour. You’re using uname -p as default, with failover to uname -m, but my uname -p outputs “Intel(R) Pentium(R) M processor 1400MHz” instead of something like i686, changed it to just use uname -m and it worked ok.
Now I don’t really know uname behaviour under different unixes, but as I tried in Linux and FreeBSD, uname -m could be just fine as the default, what do you think? ( probably I’m wrong though ).
Or you just could work on escaping, for it’s a thing people expect to just work ( my error was due to unescaped ‘(‘ ).
@Mark Mulder: async spawning only works for subsequent spawns, not for the first one. Touching restart.txt essentially shuts down all existing processes.
I copied my project to a folder in my home without spaces and still gives the same error!
@Herminio Torres: In your case it looks like your gcc compiler is broken. Try reinstalling it.
@rofh: Just fixed this in git.
@Hongli Lai
Ah I see, I was thinking it served another purpose, sorry about that.
Are settings like PassengerPreStart and PassengerMinInstances coming to nginx as well? I can only see them in the Apache manual, I’ll excuse myself beforehand if this is in the nginx version already but just not updated in the docs just yet.
@Mark Mulder: Nginx has them. Look for passenger_pre_start and passenger_min_instances instead.
@Hongli Lai i’m reinstall my gcc and still the same problem.
information from my linux: http://pastie.org/1161021
erro when run passenger start: http://pastie.org/1161028
the passenger chooses a default path to gcc? or passenger needs a version of gcc?
It uses the default gcc. Then can you install Nginx separately and see whether that works?
when I went to install only the ngix gave error.
see:
pasted on pastie the output of each command
./configure -> http://pastie.org/1161113
make -> http://pastie.org/1161126
the gem has a problem when going to use it in standalone.
I downloaded the source code to ngix
I got this:
*** ERROR: command failed: sh ./configure ‘–prefix=/home/herminio/.passenger/standalone/3.0.0.pre1-i686-ruby1.9.2-linux-gcc4.4.3-1002/nginx-0.7.67′ –without-pcre –without-http_rewrite_module –without-http_fastcgi_module ‘–add-module=/home/herminio/.passenger/standalone/3.0.0.pre1-i686-ruby1.9.2-linux-gcc4.4.3-1002/support/ext/nginx’
I went to the path of the source code to ngix
run the same configure command from the error of passenger start
and run the make and sudo make install.
then went the way of my rails project
and run passenger start e done
=============== Phusion Passenger Standalone web server started ===============
PID file: /home/herminio/rubylearning/test/sample_app/tmp/pids/passenger.3000.pid
Log file: /home/herminio/rubylearning/test/sample_app/log/passenger.3000.log
Environment: development
Accessible via: http://0.0.0.0:3000/
You can stop Phusion Passenger Standalone by pressing Ctrl-C.
===============================================================================
is it no problem with the gem? because I did not install any lib in my linux
I am going to get it installed in our development servers and couple of EC2 instances.
looking forward for passenger lite release for my mbp
It needs some more investigation. At this time I don’t know why it fails for you.
moved to another project of mine and I used the passenger start returns me this error:
passenger start
*** ERROR ***
Could not start Passenger Nginx core:
[alert]: could not open error log file: open()
“/home/herminio/.passenger/standalone/3.0.0.pre1-i686-ruby1.9.2-linux-gcc4.4.3-1
002/nginx-0.7.67/logs/error.log” failed (13: Permission denied)
2010/09/15 16:26:46 [emerg] 17307#0: invalid log level “de” in
/tmp/passenger-standalone.17294.conf:4
Stopping web server… done
the passenger has trouble booting when there paths like this:
~/Área de Trabalho
why the passenger gave the above error
Awesome guys! Great work again!
Passenger standalone fails when starting in a path containing spaces
Testing standalone mode under Snow Leopard with Rails 3 application.
passenger beta is part of bundle.
Application is a simple one, testing a simple “rails new testing” application.
http://gist.github.com/581478
Hitting the information page.
Using RVM with 1.9.2-p0
Either bundle exec passenger start or passenger start generates the same output.
the Mass Deploy will be a paid feature in future? or it’s just don’t launched on this version?
You guys do amazing amazing work.
Gotta find some time to try this out soon.
@Wilker: It will be one of the features we’re reserving for the premium version. More on this and the other awesome features that we’ve got in store for that version will be announced in the very near future. They’re nothing short than jawdropping we believe.
[...] Phusion Passenger 3.0.0 public beta 1 is out! – Phusion Corporate Blog – w00t passenger with rvm support baked in and "passenger start" from inside a project directory. [...]
Great Guys!
We are eagerly waiting for this.
Thanks a lot!!
Having same problem as @Luis
simple rails new app, passenger gem installed fine, bundle check ok, using rvm 1.9.2 & gemset
getting same error cf. http://gist.github.com/581478
rvm with Ruby Enterprise Edition 2010.02 & gemset
following error is apparent http://www.pastie.org/1162737
I already installed new passenger in production ( 1 server ), rvm with ree at least with no problems! min-max instances is what i need
Great work guys! Can’t wait to test it out my Sinatra apps!
Tried on my development box, went from a solid 27mb/sec to 14mb/s, so pretty much half the performance from what I got with 2.2.14.
Request/second is down from 2000 to 1200.
Ruby 1.9.1
Am I missing something here? I would expect it to at least be just as fast as the previous version.
@Erik: Are you on Apache or Nginx? Does downgrading to 2.2.14 give you the speed back? How are you measuring performance? Did you take spawn times into account?
Sorry, forgot some details there
NGINX 0.8.50
Downgrading gives my old speed.
Measuring with ab (not a perfect tool I know, but it gives me a ball park at least). Running at least two warmup runs for spawning and then three tests to get an average.
What OS are you on? Does it happen with every app or just your app? What if you benchmark hello world?
Debian 5 (2.6.26 amd64)
I’ve only tested my own application, which is a extremely basic Rack-app without any bells and whistles.
[...] Подробнее в статье Phusion Passenger 3.0.0 public beta 1 is out! [...]
Hello huys, great work going with Passenger 3 beta 1.
I’m having the same issue @luis is having, using gemsets, when I run the application and go to localhost:3000 for the first time, it fires an error saying it does not find some gem. If I install the gem in the default env, not the gemset, it finds it and explodes in another missing gem. So it seems it’s not loading the current gemset.
Thanks.
I’m trying to use passenger standalone with a Sinatra app, but it seems to ignore config.ru, and thus not recognize sinatra.
Any ideas? Thank you!
Here’s my new findings from a HelloWorld application, hopefully this is helpful in some way.
Passenger 2.2.15 – 2600req/sec
Passenger 3.0.0 – 1100req/sec
Ruby 1.9.2
Application code:
“class HelloWorld
def call(env)
[200, {"Content-Type" => "text/plain"}, ["Hello world!"]]
end
end
run HelloWorld.new”
Any ideas what could be causing this?
The benchmark
ab -c 100 -n 25000 http://devdomain/
@Erik: can you post the full ‘ab’ output? We use almost the same benchmark in our tests.
The domain is ofc a devdomain
Passenger 3
——————————————————————-
Passenger 2.2.15
@Erik: do you hang out on IRC? I think it’s faster if we can communicate directly. I’m FooBarWidget on irc.freenode.net #passenger
The problem with Erik is solved. Turns out to be virtualization overhead in combination with some threading settings.
[...] team at Phusion have been hard at work on Passenger 3 and last week released a beta version for testing. Continuing our work with Passenger 2, we’ve been working hard on packaging [...]