Updated Passenger Releases »

Created at: 30.08.2011 23:40, source: Engine Yard Blog, tagged: Product Technology passenger

The other day while I was in the midst of a discussion about Linux kernel upgrades, one of the other engineers who works at Engine Yard, Scott Likens, sent me a github URL:

https://github.com/FooBarWidget/passenger/commit/4d765d71ea689c42ade897fc93851b8a8797e9c7

It turned out that this patch had hit the Passenger github repo after our last set of ebuild releases, so I started investigating.

The patch fixes a concerning issue. Consider the simplest valid HTTP request for HTTP 1.0:

GET / HTTP/1.0

That request line alone is a simple, trivial HTTP request. With unpatched Passenger versions, a simple request of this nature returns a surprising response:

# curl -0 -H "Host:" http://MY.URL
curl: (52) Empty reply from server

The expected response would have been some sort of valid HTTP, but not only is there an empty reply from the server, which is bad enough in itself, but if you are on the server and pay attention to the list of processes, you will notice that this request causes a fault which kills the nginx worker process that was handling it. Nginx is an innocent victim in this case because it is the Passenger code that is at fault.

For a more visual example than curl provides, you could use a tool such as http://web-sniffer.net/. Do HTTP/1.0 without a Host header, and you'll see the same thing, regardless of the content of any other headers. Add the Host header back, and it works as expected.

It appears that the bug was caused by the SERVER_NAME patch, which was part of 3.0.8, and fixed a bug so that Rack::URLMap would work correctly.

You can use either of these tools to test your own applications.

This seemed like an important bug to have fixed in our nginx+passenger ebuilds here at Engine Yard, so after confirming the bug, and the patch, I built new versions of all of our relevant ebuilds to incorporate this patch. As of the time that this blog post was published, these builds have been live in our build tree for several days. AppCloud customers, you can update your own application to use these builds simply by clicking on the Upgrade button in your application dashboard. You may do so at your convenience, and can test that the patch fixed the problem by using either curl from the command line, or a web based tool such as the http://web-sniffer.net/ mentioned above. xCloud customers, you can request this update by filing a ticket with support.

We'd like to thank Phusion for all of their work on Passenger, and for fixing this particular bug. We look forward to the next release of Passenger, and we look forward to continuing to provide our customers with the most reliable systems that we can.


more »

[Update] Nginx Update Coming Wednesday »

Created at: 14.05.2011 04:19, source: Engine Yard Blog, tagged: Product appcloud nginx passenger

MAY 15, 2011 UPDATE: We've decided to postpone this update until Wednesday, May 18, 2011 in order to give you some additional time to review the necessary information and ensure that you are prepared. We hope that you will benefit from this nginx update. On Monday, May 16, 2011 Wednesday, May 18, 2011 we will release an updated version of the ngnix web server to our AppCloud technology stack in addition to a few other minor stack updates. All customers not using Passenger 2 will be updated to 0.8.54. This change happens when the “Update” button is clicked. Highlights of this update include –

  • Increased alignment with “Nginx Best Practices” by replacing If statements with try_files.
  • Reduction of 502 Gateway errors on Passenger via increased standardization across stack components.
All customers, especially those using keep files and/or custom nginx cookbooks, should review the release notes for this update before clicking “Update.” You can also review the patch for the coming changes to ensure you're prepared.


more »

Double Shot #618 »

Created at: 04.01.2010 14:31, source: A Fresh Cup, tagged: Double Shot css javascript jquery mysql passenger rssowl sphinx textmate

Well, at least it's January.

  • Primer - Paste in HTML, get back a CSS stylesheet with all the classes and IDs listed.
  • jLinq - LINQ style querying in Javascript. This is getting out of hand.
  • Save MySQL! - You know, if the MySQL founders wanted to exercise so much control over its future, maybe they shouldn't have sold the company.
  • RSSOwl 2.0.2 - A new release of a desktop RSS reader. That's a rare occurence these days.
  • hanoi - Some glue for automated jQuery testing.
  • netrecorder - Record actual network traffic for later use with fakeweb.
  • A Month in the Life of Thinking Sphinx - Lots of nice changes to this gem lately.
  • phd - Push deployments for passenger.
  • ReMate - TextMate plugin to disable automatic project tree refresh, making TM more useful against remote shares.


more »

82,520 minutes on Phusion Passenger »

Created at: 10.04.2009 13:10, source: Robby on Rails, tagged: Ruby on Rails ruby programming PLANET ARGON passenger mongrel development osx rubyonrails rails railsboxcar hosting deployment

It’s been over 83,520 minutes since I made the switch from using mongrel as my development environment web server to Phusion Passenger. I’ve been extremely impressed with it. Our team has all switched over and haven’t really hit any obstacles in the transition.

Since some people asked me to let them know how this trial period worked out, I felt it was my duty to encourage you all to try it. You can check out my previous post, Switch to Passenger (mod_rails) in development on OSX in less than 7 minutes or your money back! to get rolling.

Additionally, if you’re looking for a streamlined Ruby on Rails deployment environment that includes Passenger, check out Rails Boxcar.


more »

Switch to Passenger (mod_rails) in development on OSX in less than 7 minutes or your money back! »

Created at: 12.02.2009 00:52, source: Robby on Rails, tagged: Ruby on Rails programming development planetargon boxcar rubyonrails rails passenger osx apache

We recently switched our default builds of Rails Boxcar to leverage the benefits of using Passenger (mod_rails) for deployment of your Ruby on Rails applications and it’s been working out great for our customers. Several of our customers and colleagues mentioned that they also began using Passenger in development, which was intriguing.

But… Mongrel has been working great for us for the past few years. Why switch?

It’s true, I’ve been happily using mongrel since it came out as a replacement to webrick back in early 2006, which makes it about 28 in dog years.

Nigel and I
Nigel and I.. 2 1/2 years ago back when Mongrel was just a puppy

But… over the next few weeks, I’m going to evaluate Passenger in my development workflow. There’s no better way to try something then to jump head first. So… here goes.

locke
this guy was a passenger…and I recently started to watch the show

Our team will be evaluating Passenger in our development work flow with a forthcoming blog post but if you want to get your feet wet right away, here are some instructions for setting up Passenger on OSX with PrefPane, which were inspired by Manfred’s posts.

Installing Passenger via RubyGems

To install Passenger on your OSX machine, just run the following with root credentials.

sudo gem install passenger

This will install the passenger gem on your machine. Now we need to go ahead and run a script that is provided with this gem (also with root credentials).

sudo passenger-install-apache2-module

You’ll want to follow the instructions that appear. When you see something similar to the following output from the command, you’ll want to copy/paste that into an apache configuration file. I just created a file at /etc/apache2/other/passenger.conf.

Edit this file with your editor of choice

mate /etc/apache2/other/passenger.conf

Mine looks like:


  #/etc/apache2/other/passenger.conf

  # Passenger modules and configuration
  LoadModule passenger_module /opt/local/lib/ruby/gems/1.8/gems/passenger-2.0.6/ext/apache2/mod_passenger.so
  PassengerRoot /opt/local/lib/ruby/gems/1.8/gems/passenger-2.0.6
  PassengerRuby /opt/local/bin/ruby

  # Set the default environment to development
  RailsEnv development

  # Which directory do you want Apache to be able to look into for projects?
  <Directory "/Users/robbyrussell/Projects/development">
      Order allow,deny
      Allow from all
  </Directory>

Once you finish running through sudo passenger-install-apache2-module, you’ll need to restart Apache on your workstation. This can be done by simply turning off/on Web Sharing in your Sharing Preference Pane.

Sharing

Alright, we got through the hard part. Now, in order for you to begin using Passenger, we need to setup Apache to point to your individual Ruby on Rails application(s). You can hack on Apache configuration files more, but there is an easier way thanks to the Passenger Preference Pane.

This will manage your VHost files for you!

Setting up Preference Pane

If you followed my post on installing Ruby on Rails via MacPorts, you’re going to need to install Ruby Cocoa, which can be done with the following. If you’re using the Ruby provided from Apple, you can skip this step.

sudo port install rb-cocoa

Once that is done, go ahead and move on and download Passenger Preference Pane. Once downloaded, you can install the preference pane, by double-clicking on the following file.

PassengerPane-1.2

The next part is really simple as well. Just begin to add your various Ruby on Rails projects into the Preference Pane… and when you’re done, you should be able to run your applications over port 80 without any problems.

As you can see, I’ve already setup a handful of projects and we don’t have to start/stop mongrels for each one or worry about port numbers when running multiple projects. (time savings!)

Passenger

Voila. Simple enough. You might need to stop/start Apache, couldn’t remember if I needed to or not.

For each host that you add into this panel, it’ll automatically be added so that you can immediately browse to http://yourhost.local and it should just work. :-)

Things to still figure out…

Debugging. If you’re used to doing --debugger, it appears that you can do something similar with the socket-debugger plugin. Not tried it myself, but worth looking into.

Browser testing via VMWare/Parallels/VirtualBox. Does anybody have any tips on how to best appraoch this? Our designers are curious…

As I mentioned, this is day one of trying it out and managed to motivate our entire design and development team to try it with me so that we can all learn about issues together and find solutions quicker. If you’ve been using this approach for a while, I’d be interested in hearing your story and if there are any issues that we should be aware of.


more »