<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Phusion Corporate Blog</title>
	<atom:link href="http://blog.phusion.nl/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.phusion.nl</link>
	<description></description>
	<lastBuildDate>Thu, 16 May 2013 20:51:32 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Announcing BubbleConf 2013 date and venue!</title>
		<link>http://blog.phusion.nl/2013/05/16/annoucing-bubbleconf-2013-date-and-venue/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=annoucing-bubbleconf-2013-date-and-venue</link>
		<comments>http://blog.phusion.nl/2013/05/16/annoucing-bubbleconf-2013-date-and-venue/#comments</comments>
		<pubDate>Thu, 16 May 2013 14:54:03 +0000</pubDate>
		<dc:creator>Ninh Bui</dc:creator>
				<category><![CDATA[BubbleConf]]></category>

		<guid isPermaLink="false">http://blog.phusion.nl/?p=3588</guid>
		<description><![CDATA[BubbleConf: One day of ideas and action with the most vocal minds from tech, design, UX and business. On october 12th 2012, we had the pleasure of co-organizing BubbleConf with our friends from Nedap and Teixido: the very first conference in Amsterdam aimed at designers, developers and entrepreneurs that was actually affordable for (bootstrapped) startups [...]]]></description>
				<content:encoded><![CDATA[<div style="float: right; font-family: serif; font-size: 15px; width: 200px; text-align: center; margin: 0 0 1em 1em; line-height: 1.2em; font-style: italic">BubbleConf: One day of ideas and action with the most vocal minds from tech, design, UX and business.<br /><br /><a href="http://www.bubbleconf.com"><img src="http://www.bubbleconf.com/assets/2012/logo_small.png"></a></div>

<p>On october 12th 2012, we had the pleasure of co-organizing BubbleConf with our friends from <a href="http://nedap.com">Nedap</a> and <a href="http://teixido.co">Teixido</a>: the very first conference in Amsterdam aimed at designers, developers and entrepreneurs that was actually affordable for (bootstrapped) startups to attend<a href="#1">[1]</a>. <a href="http://blog.phusion.nl/2012/10/15/bubbleconf-2012-you-just-had-to-be-there-pt-1/">We were blown away by the positive reception for our very first conference: 400 people put their trust in us in delivering an unforgettable day full of ideas and inspiration to apply to their own worklife.</a> After reviewing the post conference survey, we were super excited to see so many people demanding a 2013 edition.</p>

<p>So without further ado, we&#8217;re pleased to announce that we&#8217;ll be doing a 2013 edition on <b>September 27th 2013</b> so be sure to save the date! It will be held in Amsterdam once more, but we&#8217;ll be switching venues this time around to keep things exciting and fresh. The Tuschinski Theater had already set the bar quite high as we had been able to infer from our post conference survey so it took a while for us to find a venue that was at least as awesome. With the Beurs van Berlage, we think we have found just that:</p>

<p><img src="http://www.beursvanberlage.nl/assets/Algemeen/Zalen/Effectenbeurszaal/Yakult-Zaal-overzicht.jpg" width="630" style="display: block">
&copy; <a href="http://beursvanberlage.nl">Beurs van Berlage Yakult Zaal</a></p>

<p><img src="http://www.beursvanberlage.nl/assets/Uploads/MG5694-2.jpg" width="630" style="display: block">
&copy; <a href="http://beursvanberlage.nl">Beurs van Berlage &#8220;Glazen Zaal&#8221;</a></p>

<p>The Beurs van Berlage will allow us to implement a few ideas we were unable to implement in our first edition due to time and space constraints. We look forward to sharing these ideas with you over the next couple of months leading up to BubbleConf! Many of these ideas align with what you&#8217;ve requested during last year&#8217;s survey, e.g. more opportunities to (better) meet up with one another and possibly showing each other their projects. Without saying too much just yet, please keep an eye out on our blog, twitter and newsletter to stay up to date about these developments.</p>

<p><img src="http://www.beursvanberlage.nl/assets/Algemeen/Exterieur/DSCN2523-webformaat.JPG" width="630" style="display:block">
&copy; <a href="http://beursvanberlage.nl">Beurs van Berlage terrace</a></p>

<p><img src="http://www.beursvanberlage.nl/assets/Algemeen/Zalen/Beurs%20van%20Berlage%20Cafe/MG88672.JPG" width="630" style="display:block">
&copy; <a href="http://beursvanberlage.nl">Beurs van Berlage cafe</a></p>

<p>Like last year, BubbleConf 2013 will be organized by Phusion and Nedap, and the design will be taken care of by Teixido. As for speakers, we&#8217;re once again working on securing some of the best in the business. We can already tell you that designers will be in for a huge treat. One might even say that this bubbleconf should be named <a href="http://dribbble.com">bubbbleconf</a> (typo intended <img src='http://blog.phusion.nl/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> ).</p>

<p>We started BubbleConf early this year by setting up a teaser site where people are able to purchase early believer tickets: these tickets are offered at a huge discount to people who were adventurous enough to buy them upfront without any beforehand knowledge of the date and location. We were super excited to see the first few tickets already sold this way, and want to thank these folks in particular for putting their blind-trust in us.</p>

<p>Now that the venue and date are known, the early believer discount is no longer applicable. The early bird discount however is still applicable so be sure to get your tickets asap to enjoy this discount.</p>

<p>Oh and one more thing: even though this is not yet set in stone, we&#8217;re working with <a href="http://stgm.nl">Martijn Stegeman</a> from the <a href="http://uva.nl">University of Amsterdam</a> to see if we can make this into a two day event! More specifically, we&#8217;re working with him to see if we can kick off BubbleConf with an unconference on <b>September 26th 2013</b>. Details regarding tickets to this unconference will be made available in the near future.</p>

<p>The App University will bring together BubbleConf attendees as well as students who want to learn and teach more about programming, design or entrepreneurship. It will be targeted towards novices, intermediates and experts: we&#8217;re working hard on making it as accessible as possible to a broad range of people. So if you want to learn, or teach, keep an eye out for this one.</p>

<p>Well, that wraps it up for this week&#8217;s update. Be sure to keep an eye out for our blog, <a href="https://twitter.com/bubbleconf">twitter</a> and newsletter to stay in the loop!</p>

<p><a name="1" id="1"></a>
[1] This is only possible due to the fact that we are personally sponsoring this conference for now. Like last year, all tickets are sold below cost price. Who knew that there are actually valid reasons as to why tickets are usually as expensive as they are?!  Anyway, we&#8217;ll hope to get enough sponsors one day to cover the costs but at this time, we&#8217;re just super excited to have you over and contributing to the startup cause!</p>

<p>P.S. Interested in sponsoring this event? Please feel encouraged to contact us at <a href="mailto:info@bubbleconf.com">info@bubbleconf.com</a>! We&#8217;d love to talk!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.phusion.nl/2013/05/16/annoucing-bubbleconf-2013-date-and-venue/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Phusion Passenger 4.0.2 released</title>
		<link>http://blog.phusion.nl/2013/05/07/phusion-passenger-4-0-2-released/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=phusion-passenger-4-0-2-released</link>
		<comments>http://blog.phusion.nl/2013/05/07/phusion-passenger-4-0-2-released/#comments</comments>
		<pubDate>Tue, 07 May 2013 18:45:46 +0000</pubDate>
		<dc:creator>Hongli Lai</dc:creator>
				<category><![CDATA[Phusion Passenger]]></category>
		<category><![CDATA[Phusion Passenger 4]]></category>
		<category><![CDATA[Phusion Passenger Stable Releases]]></category>
		<category><![CDATA[Security advisory]]></category>

		<guid isPermaLink="false">http://blog.phusion.nl/?p=3574</guid>
		<description><![CDATA[Phusion Passenger is software that deploys Ruby and Python web apps, by integrating into Apache and Nginx and turning them into a fully-featured application server. It is very fast, stable and robust and thus used by the likes of New York Times, AirBnB, Symantec, Pixar, etc. It comes with many features that makes your life [...]]]></description>
				<content:encoded><![CDATA[<p><a href="https://www.phusionpassenger.com/"><img src="http://blog.phusion.nl/wp-content/uploads/2012/07/Passenger_chair_256x256.jpg" width="160" height="160" class="float-right"></a>
<em><a href="https://www.phusionpassenger.com/">Phusion Passenger</a> is software that deploys Ruby and Python web apps, by integrating into Apache and Nginx and turning them into a fully-featured application server. It is very fast, stable and robust and thus used by the likes of New York Times, AirBnB, Symantec, Pixar, etc. It comes with <a href="https://www.phusionpassenger.com/">many features</a> that makes your life easier and your application perform better.</em></p>

<p>We are releasing an emergency release in response to a recently discovered remote code execution vulnerability in Nginx (<a href="http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-2028">CVE-2013-2028</a>). Many versions of Nginx 1.3, as well as Nginx 1.4.0, are affected. Phusion Passenger 4.0.2 installs Nginx 1.4.1 by default. There are no other code changes.</p>

<h2>Installing 4.0.2</h2>

<h3>Quick install/upgrade</h3>

<p><a href="https://www.phusionpassenger.com/enterprise">Phusion Passenger Enterprise</a> users can download the Enterprise version of 4.0.2 from the <a href="https://www.phusionpassenger.com/orders">Customer Area</a>.</p>

<p>Open source users can install the open source version of 4.0.2 with the following commands:</p>

<pre><code>gem install passenger
passenger-install-apache2-module
passenger-install-nginx-module
</code></pre>

<p>You can also download the tarball at <a href="http://phusion-passenger.googlecode.com/files/passenger-4.0.2.tar.gz">Google Code</a>. We strongly encourage you to <a href="http://www.modrails.com/documentation/Users%20guide%20Apache.html#_cryptographic_verification_of_installation_files">cryptographically verify</a> files after downloading them.</p>

<h3>In-depth instructions</h3>

<p>In-depth installation and upgrade instructions can be found in the Installation section of the documentation. The documentation has been updated to cover 4.0 changes, including Enterprise features. You can view them online here:</p>

<ul>
<li><a href="http://www.modrails.com/documentation/Users%20guide%20Apache.html">Apache manual</a></li>
<li><a href="http://www.modrails.com/documentation/Users%20guide%20Nginx.html">Nginx manual</a></li>
</ul>

<h2>Final</h2>

<p>If you would like to stay up to date with Phusion news, please fill in your name and email address below and sign up for our newsletter. We won&#8217;t spam you, we promise.</p>

<!-- Begin MailChimp Signup Form -->

<div id="mc_embed_signup" style="background: #ffffcc; padding: 1em 1em 0.01em 1em; border: solid 1px #ffe000">
  <form action="http://phusion.us5.list-manage.com/subscribe/post?u=9798cf0716b767b7c062d0f6f&amp;id=960849cbbe" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" style="margin-top: 1em">
    <div class="mc-field-group">
      <label for="mce-EMAIL">Email address</label><br />
      <input type="email" value="" name="EMAIL" class="required email" id="mce-EMAIL">
    </div>
    <div class="mc-field-group">
      <label for="mce-FNAME">First and last name</label><br />
      <input type="text" value="" name="FNAME" class="required" id="mce-FNAME"><input type="text" value="" name="LNAME" class="required" id="mce-LNAME">
    </div>
    <div id="mce-responses" class="clear">
      <div class="response" id="mce-error-response" style="display:none"></div>
      <div class="response" id="mce-success-response" style="display:none"></div>
    </div>
    <div class="clear" style="margin: 1em 0 1em 0"><input type="submit" value="Subscribe" name="subscribe" id="mc-embedded-subscribe" class="button"></div>
  </form>
</div>

<!--End mc_embed_signup-->
]]></content:encoded>
			<wfw:commentRss>http://blog.phusion.nl/2013/05/07/phusion-passenger-4-0-2-released/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Phusion server security report</title>
		<link>http://blog.phusion.nl/2013/05/07/phusion-server-security-report/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=phusion-server-security-report</link>
		<comments>http://blog.phusion.nl/2013/05/07/phusion-server-security-report/#comments</comments>
		<pubDate>Tue, 07 May 2013 18:14:37 +0000</pubDate>
		<dc:creator>Hongli Lai</dc:creator>
				<category><![CDATA[Security advisory]]></category>

		<guid isPermaLink="false">http://blog.phusion.nl/?p=3567</guid>
		<description><![CDATA[Executive summary: our web host Linode has been compromised and the responsible hacker group appears to claim to have had access to one of the Phusion servers, which prompted us to start a full investigation. Until now, no evidence of third party access has been found, and no tampering of the Phusion Passenger Enterprise files [...]]]></description>
				<content:encoded><![CDATA[<p><em>Executive summary: our web host Linode has been compromised and the
responsible hacker group appears to claim to have had access to one of
the Phusion servers, which prompted us to start a full investigation.
Until now, no evidence of third party access has been found, and no
tampering of the Phusion Passenger Enterprise files have been found.
In spite of this, we are taking precautionary action and we urge
customers to verify their Phusion Passenger Enterprise installations
through the instructions at the bottom of this message.</em></p>

<p>Dear users and customers,</p>

<p>About 3 weeks ago, our web host Linode issued several public statements[1][2]
claiming that one of their customers was the subject of an attack by a group
called HTP. From what we&#8217;ve been able to read from HTP[3] a few hours ago, we
believe that SwiftIRC and/or nmap was the target Linode was referring to.</p>

<p>In Linode&#8217;s initial statement[1], they also mentioned that law officials were
aware of the attack and that Linode had found no evidence of other customer
data being compromised. We too hadn&#8217;t noticed any suspicious activity on our
servers and weren&#8217;t notified by Linode about being the attacked target which
led us to believe that this initial statement held true.</p>

<p>A few hours ago however, a statement released by HTP was brought to our
attention wherein they claimed otherwise[3]. In particular, the statement
appears to claim that HTP has had root access to one of the Phusion servers and
this immediately prompted us to start a new investigation of our own. Up to this
point, we have found no evidence that they have had access to our data, but we
are checking our systems several times over to minimize the possibility of
having missed a potential attack vector on the first few passes. We have also
contacted Linode to get a clarification on their first statement[1] in light of
new events that seem to point to nmap&#8217;s server to have indeed been compromised.
Pending this response, we didn&#8217;t want to take any risks in waiting to notify
our customers of the current situation.</p>

<p>The absence of evidence after all doesn&#8217;t necessarily mean that the server has
not been accessed: even though we feel we have taken all the necessary steps to
ensure maximum security on our servers, we remain scrutinous of our systems&#8217;
integrity at all times. There are after all a myriad of components that comprise
a server, and each of them could be a potential attack vector as long as fault
free software is something developers in general can only hope to aspire to.
More specifically, as long as erring is human, we can only hope to minimize
these chances rather than believing we can prevent them completely 100% of the
time. Zero day exploits can always occur at any time and the best thing we can
do is to be as transparent about this to our customers as we can. To that end,
we&#8217;d like to notify our customers that we are moving our services to another
web host and will be reinstalling our servers as a precaution.</p>

<p>If HTP has indeed compromised our systems without us being able to tell, then we
would be interested in learning how and would encourage them to contact us
(info@phusion.nl). We value security and transparency over pride and are
extremely committed towards serving our customers. It is also the reason why we
are informing our customers about this in an open manner several hours after
seeing HTP&#8217;s claim despite not being able to verify this claim to be accurate
ourselves.</p>

<p>We would also like to take this opportunity to encourage all Phusion Passenger
users &#8211; that is, open source users and Enterprise customers alike &#8211; to make use of
the PGP digital signatures that we employed since February this year.[4] Checking
the signature of your Phusion Passenger download against the corresponding key
helps minimize the chances of the downloaded software being tampered with.
We have already manually reviewed the Phusion Passenger Enterprise source code
and have found no evidence of suspicious activity. For your own safety however,
we would always recommend you to take proper caution when downloading and
installing software from the internet. The PGP digital signatures are provided
to aid in that aspect and we would highly recommend you to use this at all times.</p>

<p>Having said this, if our servers actually were accessed, then it&#8217;s possible that
the attackers temporarily inserted compromised gems and tarballs and removed
them later. We therefore urge our Enterprise customers to verify the integrity
of  their Phusion Passenger Enterprise installations. Instructions can be found
at the end of this message.</p>

<p>In any case, Phusion has not, does not and will not store customer creditcard
information on any of its servers. All credit card information is stored on
servers of third party, PCI-DSS compliant payment gateways, e.g. FastSpring
and Paypal. Phusion also does not store customer passwords in plain text; all
customer passwords are stored in BCrypt format.</p>

<p>The open source version of Phusion Passenger is hosted on another server, namely
GitHub, and we have also found no suspicious activity in its repository.</p>

<p>We understand that after reading all this, you might have concerns with regards
to your own server&#8217;s integrity. Even though we have found no evidence of
suspicious activity on our own servers or in Phusion Passenger&#8217;s code base, we
feel that we should still encourage you to remain scrutinous of your own
servers&#8217; integrity and take the steps you deem necessary in maximizing its
security.</p>

<p>Needless to say, we remain committed in being transparent towards our customers
and will continue in keeping them up to date of any of our findings concerning
this matter. If you have any questions, please feel encouraged to contact
support@phusion.nl.</p>

<p>With warm regards,<br />
Hongli Lai<br />
Ninh Bui</p>

<p>References:</p>

<ol>
<li><a href="https://blog.linode.com/2013/04/12/security-notice-linode-manager-password-reset/">https://blog.linode.com/2013/04/12/security-notice-linode-manager-password-reset/</a></li>
<li><a href="https://blog.linode.com/2013/04/16/security-incident-update/">https://blog.linode.com/2013/04/16/security-incident-update/</a></li>
<li><a href="http://straylig.ht/zines/HTP5/0x02_Linode.txt">http://straylig.ht/zines/HTP5/0x02_Linode.txt</a></li>
<li><a href="http://www.modrails.com/documentation/Users%20guide%20Apache.html#_cryptographic_verification_of_installation_files">http://www.modrails.com/documentation/Users%20guide%20Apache.html#_cryptographic_verification_of_installation_files</a></li>
</ol>

<h2>Instructions for verifying Phusion Passenger Enterprise installations</h2>

<p>We have generated SHA-1 hashes of all Phusion Passenger Enterprise files
inside the gems and tarballs. You can use these hashes to verify your installed
Phusion Passenger files. If anything is amiss or if you require further
assistance, please contact support@phusion.nl.</p>

<ol>
<li>Install GnuPG. Debian users can <code>apt-get install gnupg</code>, OS X users can use GPG Tools: <a href="https://gpgtools.org/">https://gpgtools.org/</a></li>
<li>Login to the Customer Area: <a href="https://www.phusionpassenger.com/orders">https://www.phusionpassenger.com/orders</a></li>
<li>Scroll down to the &#8220;Files&#8221; section.</li>
<li>Download the &#8220;sha1sums.txt&#8221; and &#8220;sha1sums.txt.asc&#8221; files that pertain to the
version of Phusion Passenger Enterprise that you&#8217;re currently running.
Ensure that both files are in the same directory.</li>
<li>Import the Phusion Software Signing PGP key: <a href="http://www.modrails.com/documentation/Users%20guide%20Apache.html#_importing_the_phusion_software_signing_key">http://www.modrails.com/documentation/Users%20guide%20Apache.html#_importing_the_phusion_software_signing_key</a>
Name: Phusion Software Signing (software-signing@phusion.nl)
Short key ID: 0x0A212A8C
Long key ID: 0x2AC745A50A212A8C
Fingerprint: D5F0 8514 2693 9232 F437  AB72 2AC7 45A5 0A21 2A8C</li>
<li>Set this key to trusted:
gpg &#8211;edit-key software-signing@phusion.nl
Then in the GPG prompt, type: trust
Choose: 5 = I trust ultimately
In the GPG prompt, type: save</li>
<li>Verify the downloaded sha1sums.txt against its signature:
gpg &#8211;verify sha1sums.txt.asc
You should see:
Good signature from &#8220;Phusion Software Signing <a href="mai&#108;&#116;&#111;&#58;&#115;&#111;&#102;&#116;&#119;&#97;&#114;&#101;&#45;&#115;&#105;&#x67;&#x6e;&#x69;&#x6e;&#x67;&#x40;&#x70;&#x68;&#x75;&#x73;&#x69;&#x6f;&#x6e;&#x2e;&#x6e;l">&#115;&#111;&#102;&#116;&#119;&#97;&#114;&#101;&#45;&#115;&#105;&#x67;&#x6e;&#x69;&#x6e;&#x67;&#x40;&#x70;&#x68;&#x75;&#x73;&#x69;&#x6f;&#x6e;&#x2e;&#x6e;l</a>&#8220;</li>
<li>Copy sha1sums.txt to your server.</li>
<li>On your server, find out where the Phusion Passenger files are by running: passenger-config &#8211;root</li>
<li>Run: cd <PATH THAT YOU JUST SAW></li>
<li>Run: sha1sum -c /path-to/sha1sums.txt &#8211;quiet</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://blog.phusion.nl/2013/05/07/phusion-server-security-report/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Phusion Passenger 4.0.1 final release</title>
		<link>http://blog.phusion.nl/2013/05/06/phusion-passenger-4-0-1-final-release/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=phusion-passenger-4-0-1-final-release</link>
		<comments>http://blog.phusion.nl/2013/05/06/phusion-passenger-4-0-1-final-release/#comments</comments>
		<pubDate>Mon, 06 May 2013 10:44:15 +0000</pubDate>
		<dc:creator>Hongli Lai</dc:creator>
				<category><![CDATA[Phusion Passenger]]></category>
		<category><![CDATA[Phusion Passenger 4]]></category>
		<category><![CDATA[Phusion Passenger Stable Releases]]></category>

		<guid isPermaLink="false">http://blog.phusion.nl/?p=3539</guid>
		<description><![CDATA[Phusion Passenger is software that deploys Ruby and Python web apps, by integrating into Apache and Nginx and turning them into a fully-featured application server. It is very fast, stable and robust and thus used by the likes of New York Times, AirBnB, Symantec, Pixar, etc. It comes with many features that makes your life [...]]]></description>
				<content:encoded><![CDATA[<div style="text-align: center"><a href="https://www.phusionpassenger.com/"><img src="http://blog.phusion.nl/wp-content/uploads/2013/05/passenger_4_announcement.jpg" alt="Phusion Passenger 4" width="413" height="653" class="alignnone size-full wp-image-3543" /></a></div>

<p><em><a href="https://www.phusionpassenger.com/">Phusion Passenger</a> is software that deploys Ruby and Python web apps, by integrating into Apache and Nginx and turning them into a fully-featured application server. It is very fast, stable and robust and thus used by the likes of New York Times, AirBnB, Symantec, Pixar, etc. It comes with <a href="https://www.phusionpassenger.com/">many features</a> that makes your life easier and your application perform better.</em></p>

<p>After a period of being in beta, we&#8217;re proud to announce the first stable release of the Phusion Passenger 4 series. The 4.x series is a huge improvement over the 3.x series: during the development of 4.0, we&#8217;ve introduced a myriad of changes which we&#8217;ve covered in past beta preview articles:</p>

<div style="float: right; margin: 0 0 1em 1em; display: none"><img src="http://blog.phusion.nl/wp-content/uploads/2012/10/wsgi.png"><br /><img src="http://blog.phusion.nl/wp-content/uploads/2012/10/jruby-logo.png"><br /><img src="http://blog.phusion.nl/wp-content/uploads/2012/10/rubinius_logo_black_on_white.png"></div>

<ul>
<li><a href="http://blog.phusion.nl/2012/10/24/phusion-passenger-4-0-beta-1-is-here/">Support for multiple Ruby versions, support for Python WSGI, multithreading, evented core similar to Nginx and Node.js, real-time response buffering, improved zero-copy architecture, better error diagnostics.</a></li>
<li><a href="http://blog.phusion.nl/2012/10/30/phusion-passenger-4-0-supports-jruby-rubinius/">JRuby and Rubinius support.</a></li>
<li><a href="http://blog.phusion.nl/2013/01/22/phusion-passenger-4-technology-preview-out-of-band-work/">Out-of-Band Work.</a></li>
<li><a href="http://blog.phusion.nl/2013/01/23/the-new-rack-socket-hijacking-api/">Support for the Rack socket hijacking API.</a></li>
<li><a href="http://blog.phusion.nl/2013/01/24/phusion-passenger-4-0-beta-2-syscall-failure-simulation-framework-focus-on-stability/">Improved stability and test suite</a>.</li>
<li>Ruby 2.0 support.</li>
</ul>

<div style="text-align: center"><img src="http://blog.phusion.nl/wp-content/uploads/2012/10/wsgi.png" height="75" style="vertical-align: top">
<img src="http://blog.phusion.nl/wp-content/uploads/2012/10/jruby-logo.png" height="75" style="vertical-align: top; margin-left: 1em">
<img src="http://blog.phusion.nl/wp-content/uploads/2012/10/rubinius_logo_black_on_white.png" height="100" style="vertical-align: top; margin-left: 1em"></div>

<p>The beta period took a while because we wanted to ensure that the first stable release is indeed rock solid. People tend to say that one should skip &#8220;x.0.0&#8243; releases and wait until &#8220;x.0.1&#8243; for the first bug fixes. But we&#8217;re confident enough about the stability of the 4.x series that we gave this first release the version number <strong>4.0.1</strong>.</p>

<h2>Changes in 4.0.1</h2>

<p>Compared to 4.0.0 RC 6, the following changes have been introduced:</p>

<ul>
<li>Fixed a crasher bug in the Deployment Error Resistance feature.</li>
<li>Fixed a bug in PassengerDefaultUser and PassengerDefaultGroup.</li>
<li>Fixed a bug which could cause application processes to exit before they&#8217;ve finished their request.</li>
<li>Fixed some small file descriptor leaks.</li>
<li>Bumped the preferred Nginx version to 1.4.0.</li>
<li>Editing the Phusion Passenger Standalone Nginx config template is no longer discouraged.</li>
<li>Improved documentation.</li>
</ul>

<h2>Installing and testing 4.0.1</h2>

<h3>Quick install/upgrade</h3>

<p><a href="https://www.phusionpassenger.com/enterprise">Phusion Passenger Enterprise</a> users can download the Enterprise version of 4.0.1 from the <a href="https://www.phusionpassenger.com/orders">Customer Area</a>.</p>

<p>Open source users can install the open source version of 4.0.1 with the following commands:</p>

<pre><code>gem install passenger
passenger-install-apache2-module
passenger-install-nginx-module
</code></pre>

<p>You can also download the tarball at <a href="http://phusion-passenger.googlecode.com/files/passenger-4.0.1.tar.gz">Google Code</a>. All our gems and tarballs can be <a href="http://www.modrails.com/documentation/Users%20guide%20Apache.html#_cryptographic_verification_of_installation_files">cryptographically verified</a>.</p>

<h3>In-depth instructions</h3>

<p>In-depth installation and upgrade instructions can be found in the Installation section of the documentation. The documentation has been updated to cover 4.0 changes, including Enterprise features. You can view them online here:</p>

<ul>
<li><a href="http://www.modrails.com/documentation/Users%20guide%20Apache.html">Apache manual</a></li>
<li><a href="http://www.modrails.com/documentation/Users%20guide%20Nginx.html">Nginx manual</a></li>
</ul>

<h2>Final</h2>

<p>We would like to thank everybody who has helped with testing the betas and release candidates so far, and we would like to thank our <a href="https://www.phusionpassenger.com/enterprise">Enterprise</a> customers. We couldn&#8217;t have done it without you!</p>

<p>4.0.1 is just the beginning though. We have many excited changes on the pipeline. Want to stay up to date? Fill in your name and email address below and sign up for our newsletter. We won&#8217;t spam you, we promise.</p>

<!-- Begin MailChimp Signup Form -->

<div id="mc_embed_signup" style="background: #ffffcc; padding: 1em 1em 0.01em 1em; border: solid 1px #ffe000">
  <form action="http://phusion.us5.list-manage.com/subscribe/post?u=9798cf0716b767b7c062d0f6f&amp;id=960849cbbe" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" style="margin-top: 1em">
    <div class="mc-field-group">
      <label for="mce-EMAIL">Email address</label><br />
      <input type="email" value="" name="EMAIL" class="required email" id="mce-EMAIL">
    </div>
    <div class="mc-field-group">
      <label for="mce-FNAME">First and last name</label><br />
      <input type="text" value="" name="FNAME" class="required" id="mce-FNAME"><input type="text" value="" name="LNAME" class="required" id="mce-LNAME">
    </div>
    <div id="mce-responses" class="clear">
      <div class="response" id="mce-error-response" style="display:none"></div>
      <div class="response" id="mce-success-response" style="display:none"></div>
    </div>
    <div class="clear" style="margin: 1em 0 1em 0"><input type="submit" value="Subscribe" name="subscribe" id="mc-embedded-subscribe" class="button"></div>
  </form>
</div>

<!--End mc_embed_signup-->
]]></content:encoded>
			<wfw:commentRss>http://blog.phusion.nl/2013/05/06/phusion-passenger-4-0-1-final-release/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Phusion Passenger 4.0 Release Candidate 6</title>
		<link>http://blog.phusion.nl/2013/04/09/phusion-passenger-4-0-release-candidate-6/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=phusion-passenger-4-0-release-candidate-6</link>
		<comments>http://blog.phusion.nl/2013/04/09/phusion-passenger-4-0-release-candidate-6/#comments</comments>
		<pubDate>Tue, 09 Apr 2013 13:02:11 +0000</pubDate>
		<dc:creator>Hongli Lai</dc:creator>
				<category><![CDATA[Phusion Passenger]]></category>
		<category><![CDATA[Phusion Passenger 4]]></category>
		<category><![CDATA[Phusion Passenger Technology Previews]]></category>

		<guid isPermaLink="false">http://blog.phusion.nl/?p=3527</guid>
		<description><![CDATA[Phusion Passenger turns Apache and Nginx into a full-featured application server for Ruby and Python web apps. It has a strong focus on ease of use, stability and performance. Phusion Passenger is built on top of tried-and-true, battle-hardened Unix technologies, yet at the same time introduces innovations not found in most traditional Unix servers. Since [...]]]></description>
				<content:encoded><![CDATA[<p><a href="https://www.phusionpassenger.com/"><img src="http://blog.phusion.nl/wp-content/uploads/2012/07/Passenger_chair_256x256.jpg" width="160" height="160" class="float-right"></a>
<em><a href="https://www.phusionpassenger.com/">Phusion Passenger</a> turns Apache and Nginx into a full-featured application server for Ruby and Python web apps. It has a strong focus on ease of use, stability and performance. Phusion Passenger is built on top of tried-and-true, battle-hardened Unix technologies, yet at the same time introduces innovations not found in most traditional Unix servers. Since mid-2012, it aims to be the ultimate polyglot application server.</em></p>

<p>Today we are pleased to announce <strong>Release Candidate 6</strong> of Phusion Passenger 4.0. The 4.x series is a huge improvement over the 3.x series: during the development of 4.0, we&#8217;ve introduced a myriad of changes which we&#8217;ve covered in past beta preview articles:</p>

<ul>
<li><a href="http://blog.phusion.nl/2012/10/24/phusion-passenger-4-0-beta-1-is-here/">Support for multiple Ruby versions, support for Python WSGI, multithreading, evented core similar to Nginx and Node.js, real-time response buffering, improved zero-copy architecture, better error diagnostics.</a></li>
<li><a href="http://blog.phusion.nl/2012/10/30/phusion-passenger-4-0-supports-jruby-rubinius/">JRuby and Rubinius support.</a></li>
<li><a href="http://blog.phusion.nl/2013/01/22/phusion-passenger-4-technology-preview-out-of-band-work/">Out-of-Band Work.</a></li>
<li><a href="http://blog.phusion.nl/2013/01/23/the-new-rack-socket-hijacking-api/">Support for the Rack socket hijacking API</a></li>
<li><a href="http://blog.phusion.nl/2013/01/24/phusion-passenger-4-0-beta-2-syscall-failure-simulation-framework-focus-on-stability/">Improved stability and test suite</a>.</li>
</ul>

<p>Release Candidate 5 was a private interim release for <a href="https://www.phusionpassenger.com/enterprise">Phusion Passenger Enterprise</a> customers only.</p>

<h2>Changes in 4.0 RC 5 and RC 6</h2>

<p>The most important changes in RC 5 and RC 6 are as follows:</p>

<ul>
<li>The default config snippet for Apache has changed! It must now contain a
<code>PassengerDefaultRuby</code> option. The installer has been updated to output
this option. The <code>PassengerRuby</code> option still exists, but it&#8217;s only used
for configuring different Ruby interpreters in different contexts. Please
refer to the manual for more information.</li>
<li>We now provide GPG digital signatures for all file releases by Phusion.
More information can be found in the manual.</li>
<li>WebSocket support on Nginx. Requires Nginx >= 1.3.15.</li>
<li><code>passenger-status</code> now displays process memory usage and time when it
was last used. The latter fixes <a href="http://code.google.com/p/phusion-passenger/issues/detail?id=853">issue #853</a>.</li>
<li>Exceptions in Rack application objects are now caught to prevent
application processes from exiting.</li>
<li>The <code>passenger-config</code> tool now supports the <code>--ruby-command</code> argument,
which helps the user with figuring out the correct Ruby command to use
in case s/he wants to use multiple Ruby interpreters. The manual has
also been updated to mention this tool.</li>
<li>Fixed streaming responses on Apache.</li>
<li>Worked around an OS X Unix domain socket bug. Fixes <a href="http://code.google.com/p/phusion-passenger/issues/detail?id=854">issue #854</a>.</li>
<li>Out-of-Band Garbage Collection now works properly when the application
has disabled garbage collection. Fixes <a href="http://code.google.com/p/phusion-passenger/issues/detail?id=859">issue #859</a>.</li>
<li>Fixed support for /usr/bin/python on OS X. Fixes <a href="http://code.google.com/p/phusion-passenger/issues/detail?id=855">issue #855</a>.</li>
<li>Fixed looping-without-sleeping in the ApplicationPool garbage collector
if PassengerPoolIdleTime is set to 0. Fixes <a href="http://code.google.com/p/phusion-passenger/issues/detail?id=858">issue #858</a>.</li>
<li>Fixed some process memory usage measurement bugs.</li>
<li>Fixed process memory usage measurement on NetBSD. Fixes <a href="http://code.google.com/p/phusion-passenger/issues/detail?id=736">issue #736</a>.</li>
<li>Fixed a file descriptor leak in the Out-of-Band Work feature. Fixes <a href="http://code.google.com/p/phusion-passenger/issues/detail?id=864">issue #864</a>.</li>
<li>The PassengerPreStart helper script now uses the default Ruby
interpreter specified in the web server configuration, and no longer
requires a <code>ruby</code> command to be in <code>$PATH</code>.</li>
<li>Updated preferred PCRE version to 8.32.</li>
<li>Worked around some RVM bugs and generally improved RVM support.</li>
<li>The ngx_http_stub_status_module is now enabled by default.</li>
<li>Performance optimizations.</li>
</ul>

<h2>Installing and testing 4.0.0 Release Candidate 6</h2>

<h3>Quick install/upgrade</h3>

<p><a href="https://www.phusionpassenger.com/enterprise">Phusion Passenger Enterprise</a> users can download the Enterprise version of 4.0 RC 6 from the <a href="https://www.phusionpassenger.com/orders">Customer Area</a>.</p>

<p>Open source users can install the open source version of 4.0 RC 6 with the following commands:</p>

<pre><code>gem install passenger --pre
passenger-install-apache2-module
passenger-install-nginx-module
</code></pre>

<p>You can also download the tarball at <a href="http://phusion-passenger.googlecode.com/files/passenger-4.0.0.rc6.tar.gz">Google Code</a>.</p>

<h3>In-depth instructions</h3>

<p>In-depth installation and upgrade instructions can be found in the Installation section of the documentation. The documentation has been updated to cover 4.0 changes, including Enterprise features. You can view them online here:</p>

<ul>
<li><a href="http://www.modrails.com/documentation/Users%20guide%20Apache.html">Apache manual</a></li>
<li><a href="http://www.modrails.com/documentation/Users%20guide%20Nginx.html">Nginx manual</a></li>
</ul>

<h2>Final</h2>

<p>We are excited about the final release. You can help us by testing RC 6 and reporting any bugs. Please submit bug reports to our <a href="http://code.google.com/p/phusion-passenger/issues/list">bug tracker</a>.</p>

<!-- Begin MailChimp Signup Form -->

<div id="mc_embed_signup" style="background: #ffffcc; padding: 1em 1em 0.01em 1em; border: solid 1px #ffe000">
  We at Phusion are regularly updating our products. Want to stay up to date? Fill in your name and email address below and sign up for our newsletter. We won&#8217;t spam you, we promise.
  <form action="http://phusion.us5.list-manage.com/subscribe/post?u=9798cf0716b767b7c062d0f6f&amp;id=960849cbbe" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" style="margin-top: 1em">
    <div class="mc-field-group">
      <label for="mce-EMAIL">Email address</label><br />
      <input type="email" value="" name="EMAIL" class="required email" id="mce-EMAIL">
    </div>
    <div class="mc-field-group">
      <label for="mce-FNAME">First and last name</label><br />
      <input type="text" value="" name="FNAME" class="required" id="mce-FNAME"><input type="text" value="" name="LNAME" class="required" id="mce-LNAME">
    </div>
    <div id="mce-responses" class="clear">
      <div class="response" id="mce-error-response" style="display:none"></div>
      <div class="response" id="mce-success-response" style="display:none"></div>
    </div>
    <div class="clear" style="margin: 1em 0 1em 0"><input type="submit" value="Subscribe" name="subscribe" id="mc-embedded-subscribe" class="button"></div>
  </form>
</div>

<!--End mc_embed_signup-->
]]></content:encoded>
			<wfw:commentRss>http://blog.phusion.nl/2013/04/09/phusion-passenger-4-0-release-candidate-6/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Tuning Phusion Passenger&#8217;s concurrency settings</title>
		<link>http://blog.phusion.nl/2013/03/12/tuning-phusion-passengers-concurrency-settings/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=tuning-phusion-passengers-concurrency-settings</link>
		<comments>http://blog.phusion.nl/2013/03/12/tuning-phusion-passengers-concurrency-settings/#comments</comments>
		<pubDate>Tue, 12 Mar 2013 13:30:45 +0000</pubDate>
		<dc:creator>Hongli Lai</dc:creator>
				<category><![CDATA[Howto]]></category>
		<category><![CDATA[Phusion Passenger]]></category>
		<category><![CDATA[Phusion Passenger 4]]></category>
		<category><![CDATA[Server administration]]></category>

		<guid isPermaLink="false">http://blog.phusion.nl/?p=3306</guid>
		<description><![CDATA[Phusion Passenger turns Apache and Nginx into a full-featured application server for Ruby and Python web apps. It has a strong focus on ease of use, stability and performance. Phusion Passenger is built on top of tried-and-true, battle-hardened Unix technologies, yet at the same time introduces innovations not found in most traditional Unix servers. Since [...]]]></description>
				<content:encoded><![CDATA[<p><img src="http://blog.phusion.nl/wp-content/uploads/2013/03/circuit-board.jpg" alt="" height="150" class="alignnone size-full wp-image-3517" style="width: 100%" /></p>

<p><em><a href="https://www.phusionpassenger.com/">Phusion Passenger</a> turns Apache and Nginx into a full-featured application server for Ruby and Python web apps. It has a strong focus on ease of use, stability and performance. Phusion Passenger is built on top of tried-and-true, battle-hardened Unix technologies, yet at the same time introduces innovations not found in most traditional Unix servers. Since mid-2012, it aims to be the ultimate polyglot application server.</em></p>

<p>We recently received a support inquiry from a <a href="https://www.phusionpassenger.com/support">Phusion Passenger Enterprise</a> customer regarding excessive process creation activity. During peak times, Phusion Passenger would suddenly create a lot of processes, making the server slow or unresponsive for a period of time. This is because Phusion Passenger spawns and shuts down application processes according to traffic, but they apparently had irregular traffic patterns during peak times. Since their servers were dedicated for 1 application only, the solution was to make the number of processes constant regardless of traffic. This could be done by setting <code>PassengerMinInstances</code> to a value equal to <code>PassengerMaxPoolSize</code>.</p>

<p>The customer then raised the question: what is the best value for <code>PassengerMaxPoolSize</code>? This is a non-trivial question, and the answer encompasses more than just <code>PassengerMaxPoolSize</code>. In this article we&#8217;re going to shed more light on this topic.</p>

<p>For simplicity reasons, we assume that your server only hosts 1 web application. Things become more complicated when more web applications are involved, but you can use the principles in this article to apply to multi-application server environments.</p>

<h2>Aspects of concurrency tuning</h2>

<p>The goal of tuning is usually to <em>maximize <a href="http://en.wikipedia.org/wiki/Throughput">throughput</a></em>. Increasing the number of processes or threads increases the maximum throughput and concurrency, but there are several factors that should be kept in mind.</p>

<ul>
<li><strong>Memory.</strong> More processes implies a higher memory usage. If too much memory is used then the machine will hit swap, which slows everything down. You should only have as many processes as memory limits comfortably allow. Threads use less memory, so prefer threads when possible. You can create tens of threads in place of one process.</li>
<li><p><strong>Number of CPUs.</strong> True (hardware) concurrency cannot be higher than the number of CPUs. In theory, <em>if all processes/threads on your system use the CPUs constantly</em>, then:</p>

<ul>
<li>You can increase throughput up to NUMBER_OF_CPUS processes/threads.</li>
<li>Increasing the number of processes/threads after that point will increase virtual (software) concurrency, but will not increase true (hardware) concurrency and will not increase maximum throughput.</li>
</ul>

<p>Having more processes than CPUs may decrease total throughput a little thanks to context switching overhead, but the difference is not big because OSes are good at context switching these days.</p>

<p>On the other hand, if your CPUs are not used constantly, e.g. because they&#8217;re often blocked on I/O, then the above does not apply and increasing the number of processes/threads <em>does</em> increase concurrency and throughput, at least until the CPUs are saturated.</p></li>
<li><p><strong>Blocking I/O</strong>. This covers all blocking I/O, including hard disk access latencies, database call latencies, web API calls, etc. Handling input from the client and output to the client does not count as blocking I/O, because Phusion Passenger has buffering layers that relief the application from worrying about this.</p>

<p>The more blocking I/O calls your application process/thread makes, the more time it spends on waiting for external components. While it&#8217;s waiting it does not use the CPU, so that&#8217;s when another process/thread should get the chance to use the CPU. If no other process/thread needs CPU right now (e.g. all processes/threads are waiting for I/O) then CPU time is essentially wasted. Increasing the number processes or threads decreases the chance of CPU time being wasted. It also increases concurrency, so that clients do not have to wait for a previous I/O call to be completed before being served.</p></li>
</ul>

<p>With these in mind, we give the following tuning recommendations. These recommendations assume that your machine is dedicated to Phusion Passenger. If your machine also hosts other software (e.g. a database) then you should look at the amount of RAM that you&#8217;re willing to reserve for Phusion Passenger and Phusion Passenger-served applications.</p>

<h2>Tuning the application process and thread count</h2>

<p>In our experience, a typical single-threaded Rails application process uses 100 MB of RAM on a 64-bit machine, and by contrast, a thread would only consume 10% as much. We use this fact in determining a proper formula.</p>

<h3>Step 1: determine the system&#8217;s limits</h3>

<p>First, let&#8217;s define the maximum number of (single-threaded) processes, <em>or</em> the number of threads, that you can comfortably have given the amount of RAM you have. This is a reasonable upper limit that you can reach without degrading system performance. We use the following formulas.</p>

<p>In <strong>purely single-threaded multi-process deployments</strong>, the formula is as follows:</p>

<pre><code>max_app_processes = (TOTAL_RAM * 0.75) / RAM_PER_PROCESS
</code></pre>

<p>This formula is derived as follows:</p>

<ul>
<li><code>(TOTAL_RAM * 0.75)</code>: We can assume that there must be at least 25% of free RAM that the operating system can use for other things. The result of this calculation is the RAM that is freely available for applications.</li>
<li><code>/ RAM_PER_PROCESS</code>: Each process consumes a roughly constant amount of RAM, so the maximum number of processes is a single devision between the aforementioned calculation and this constant.</li>
</ul>

<p>In <strong>multithreaded deployments</strong>, the formula is as follows:</p>

<pre><code>max_app_threads_per_process =
  ((TOTAL_RAM * 0.75) - (NUMBER_OF_PROCESSES * RAM_PER_PROCESS * 0.9)) /
  (RAM_PER_PROCESS / 10)
</code></pre>

<p>Here, <code>NUMBER_OF_PROCESSES</code> is the number of application process you want to use. In case of Ruby or Python, this should be equal to NUMBER_OF_CPUS. This is because both Ruby and Python have a Global Interpreter Lock so that they cannot utilize multicore no matter how many threads they&#8217;re using. By using multiple processes, you can utilize multicore. If you&#8217;re using a language runtime that does not have a Global Interpreter Lock, e.g. <a href="http://blog.phusion.nl/2012/10/30/phusion-passenger-4-0-supports-jruby-rubinius/">JRuby or Rubinius</a>, then <code>NUMBER_OF_PROCESSES</code> can be 1.</p>

<p>This formula is derived as follows:</p>

<ul>
<li><code>(TOTAL_RAM * 0.75)</code>: The same as explained earlier.</li>
<li><code>- (NUMBER_OF_PROCESSES * RAM_PER_PROCESS)</code>: In multithreaded deployments, the application processes consume a constant amount of memory, so we deduct this from the RAM that is available to applications. The result is the amount of RAM available to application threads.</li>
<li><code>/ (RAM_PER_PROCESS / 10)</code>: A thread consumes about 10% of the amount of memory a process would, so we divide the amount of RAM available to threads with this number. What we get is the number of threads that the system can handle.</li>
</ul>

<p>On 32-bit systems, <code>max_app_threads_per_process</code> should not be higher than about 200. Assuming an 8 MB stack size per thread, you will run out of virtual address space if you go much further. On 64-bit systems you don&#8217;t have to worry about this problem.</p>

<h3>Step 2: derive the applications&#8217; needs</h3>

<p>The earlier two formulas were not for calculating the number of processes or threads that application needs, but for calculating how much the system can handle without getting into trouble. Your application may not actually need that many processes or threads! If your application is CPU-bound, then you only need a small multiple of the number of CPUs you have. Only if your application performs a lot of blocking I/O (e.g. database calls that take tens of milliseconds to complete, or you call to Twitter) do you need a large number of processes or threads.</p>

<p>Armed with this knowledge, we derive the formulas for calculating how many processes or threads we actually need.</p>

<ul>
<li><p>If your application performs a lot of blocking I/O then you should give it as many processes and threads as possible:</p>

<pre><code># Use this formula for purely single-threaded multi-process deployments.
desired_app_processes = max_app_processes

# Use this formula for multithreaded deployments.
desired_app_threads_per_process = max_app_threads_per_process
</code></pre></li>
<li><p>If your application doesn&#8217;t perform a lot of blocking I/O, then you should limit the number of processes or threads to a multiple of the number of CPUs to minimize context switching:</p>

<pre><code># Use this formula for purely single-threaded multi-process deployments.
desired_app_processes = min(max_app_processes, NUMBER_OF_CPUS)

# Use this formula for multithreaded deployments.
desired_app_threads_per_process = min(max_app_threads_per_process, 2 * NUMBER_OF_CPUS)
</code></pre></li>
</ul>

<h3>Step 3: configure Phusion Passenger</h3>

<p><a href="https://www.phusionpassenger.com/"><img src="http://blog.phusion.nl/wp-content/uploads/2012/07/Passenger_chair_256x256.jpg" width="160" height="160" class="float-right"></a></p>

<p>You should put the number for <code>desired_app_processes</code> into the <code>PassengerMaxPoolSize</code> option. Whether you want to make <code>PassengerMinInstances</code> equal to that number or not is up to you: doing so will make the number of processes static, regardless of traffic. If your application has very irregular traffic patterns, response times could drop while Passenger spins up new processes to handle peak traffic. Setting <code>PassengerMinInstances</code> as high as possible prevents this problem.</p>

<p>If <code>desired_app_processes</code> is 1, then you should set <code>PassengerSpawnMethod conservative</code> (on Phusion Passenger 3 or earlier) or <code>PassengerSpawnMethod direct</code> (on Phusion Passenger 4 or later). By using direct/conservative spawning instead of smart spawning, Phusion Passenger will not keep an ApplicationSpawner/Preloader process around. This is because an ApplicationSpawner/Preloader process is useless when there&#8217;s only 1 application process.</p>

<p>In order to use multiple threads you must use <a href="https://www.phusionpassenger.com/enterprise">Phusion Passenger Enterprise</a> 4. The open source version of Phusion Passenger does not support multithreading, and neither does version 3 of Phusion Passenger Enterprise. At the time of writing, Phusion Passenger Enterprise 4.0 is on its <a href="http://blog.phusion.nl/2013/03/05/phusion-passenger-4-0-release-candidate-4/">4th Release Candidate</a>. You can download it from the <a href="https://www.phusionpassenger.com/download">Customer Area</a>.</p>

<p>You should put the number for <code>desired_app_threads_per_process</code> into the <code>PassengerThreadCount</code> option. If you do this, you also need to set <code>PassengerConcurrencyModel thread</code> in order to turn on multithreading support.</p>

<h3>Possible step 4: configure Rails</h3>

<p>Only if you&#8217;re on a multithreaded deployment do you need to configure Rails.</p>

<p>Rails is thread-safe since version 2.2, but you need to enable thread-safety by setting <code>config.thread_safe!</code> in <code>config/environments/production.rb</code>.</p>

<p>You should also increase the ActiveRecord pool size because it limits concurrency. You can configure it in <code>config/database.yml</code>. Set the pool size to the number of threads. But if you believe your database cannot handle that much concurrency, keep it at a low value.</p>

<h3>Example 1: purely single-threaded multi-process deployment with lots of blocking I/O</h3>

<p>Suppose you have 1 GB of RAM and lots of blocking I/O, and you&#8217;re on a purely single-threaded multi-process deployment.</p>

<pre><code># Use this formula for purely single-threaded multi-process deployments.
max_app_processes = (1024 * 0.75)  / 100 = 7.68
desired_app_processes = max_app_processes = 7.68
</code></pre>

<p>Conclusion: you should use 7 or 8 processes. Phusion Passenger should be configured as follows:</p>

<pre><code>PassengerMaxPoolSize 7
</code></pre>

<p>However a concurrency of 7 or 8 is way too low if your application performs a lot of blocking I/O. You should use a multithreaded deployment instead, or you need to get more RAM so you can run more processes.</p>

<h3>Example 2: multithreaded deployment with lots of blocking I/O</h3>

<p>Consider the same machine and application (1 GB RAM, lots of blocking I/O), but this time you&#8217;re on a multithreaded deployment with 2 application processes. How many threads do you need per process?</p>

<p>Let&#8217;s assume that we&#8217;re using Ruby and that we have 4 CPUs. Then:</p>

<pre><code># Use this formula for multithreaded deployments.
max_app_threads_per_process
= ((1024 * 0.75) - (4 * 100)) / (100 / 10)
= 368 / 10
= 36.8
</code></pre>

<p>Conclusion: you should use 4 processes, each with 36-37 threads, so that your system ends up with . Phusion Passenger Enterprise should be configured as follows:</p>

<pre><code>PassengerMaxPoolSize 4
PassengerConcurrencyModel thread
PassengerThreadCount 36
</code></pre>

<h2>Configuring the web server</h2>

<p>If you&#8217;re using Nginx then it does not need configuring. Nginx is evented and already supports a high concurrency out of the box.</p>

<p>If you&#8217;re using Apache, then prefer the worker MPM (which uses a combination of processes and threads) or the event MPM (which is similar to the worker MPM, but better) over the prefork MPM (which only uses processes) whenever possible. PHP requires prefork, but if you don&#8217;t use PHP then you can probably use one of the other MPMs. Make sure you set a low number of processes and a moderate to high number of threads.</p>

<p>Because Apache performs a lot of blocking I/O (namely HTTP handling), you should give it a lot of threads so that it has a lot of concurrency. The number of threads should be at least the number of concurrent clients that you&#8217;re willing to serve with Apache. A small website can get away with 1 process and 100 threads. A large website may want to have 8 processes and 200 threads per process (resulting in 1600 threads in total).</p>

<p>If you cannot use the event MPM, consider putting Apache behind an Nginx reverse proxy, with response buffering turned on on the Nginx side. This reliefs a lot of concurrency problems from Apache. If you can use the event MPM then adding Nginx to the mix does not provide many advantages.</p>

<h2>Conclusion</h2>

<ul>
<li>If your application performs a lot of blocking I/O, use lots of processes/threads. You should move away from single-threaded multiprocessing in this case, and start using multithreading.</li>
<li>If your application is CPU-bound, use a small multiple of the number of CPUs.</li>
<li>Do not exceed the number of processes/threads your system can handle without swapping.</li>
</ul>

<!-- Begin MailChimp Signup Form -->

<div id="mc_embed_signup" style="background: #ffffcc; padding: 1em 1em 0.01em 1em; border: solid 1px #ffe000">
  We at Phusion are regularly updating our products. Want to stay up to date? Fill in your name and email address below and sign up for our newsletter. We won&#8217;t spam you, we promise.
  <form action="http://phusion.us5.list-manage.com/subscribe/post?u=9798cf0716b767b7c062d0f6f&amp;id=960849cbbe" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" style="margin-top: 1em">
    <div class="mc-field-group">
      <label for="mce-EMAIL">Email address</label><br />
      <input type="email" value="" name="EMAIL" class="required email" id="mce-EMAIL">
    </div>
    <div class="mc-field-group">
      <label for="mce-FNAME">First and last name</label><br />
      <input type="text" value="" name="FNAME" class="required" id="mce-FNAME"><input type="text" value="" name="LNAME" class="required" id="mce-LNAME">
    </div>
    <div id="mce-responses" class="clear">
      <div class="response" id="mce-error-response" style="display:none"></div>
      <div class="response" id="mce-success-response" style="display:none"></div>
    </div>
    <div class="clear" style="margin: 1em 0 1em 0"><input type="submit" value="Subscribe" name="subscribe" id="mc-embedded-subscribe" class="button"></div>
  </form>
</div>

<!--End mc_embed_signup-->
]]></content:encoded>
			<wfw:commentRss>http://blog.phusion.nl/2013/03/12/tuning-phusion-passengers-concurrency-settings/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Phusion Passenger 4.0 beta 1 and 2: arbitrary file deletion vulnerability</title>
		<link>http://blog.phusion.nl/2013/03/05/phusion-passenger-4-0-beta-1-and-2-arbitrary-file-deletion-vulnerability/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=phusion-passenger-4-0-beta-1-and-2-arbitrary-file-deletion-vulnerability</link>
		<comments>http://blog.phusion.nl/2013/03/05/phusion-passenger-4-0-beta-1-and-2-arbitrary-file-deletion-vulnerability/#comments</comments>
		<pubDate>Tue, 05 Mar 2013 11:33:54 +0000</pubDate>
		<dc:creator>Hongli Lai</dc:creator>
				<category><![CDATA[Phusion Passenger]]></category>
		<category><![CDATA[Phusion Passenger 4]]></category>
		<category><![CDATA[Security advisory]]></category>

		<guid isPermaLink="false">http://blog.phusion.nl/?p=3454</guid>
		<description><![CDATA[The Phusion Passenger 4.0 betas contain a vulnerability which allows arbitrary files to be deleted on the system. The vulnerability is local and cannot be exploited remotely. The vulnerability can only be triggered during application startup (e.g. during evaluation of config.ru). Environments that are at risk include, but may not be limited to: Environments that [...]]]></description>
				<content:encoded><![CDATA[<p>The Phusion Passenger 4.0 betas contain a vulnerability which allows arbitrary files to be deleted on the system. The vulnerability is local and cannot be exploited remotely. The vulnerability can only be triggered during application startup (e.g. during evaluation of config.ru). Environments that are at risk include, but may not be limited to:</p>

<ul>
<li>Environments that host arbitrary untrusted applications, e.g. shared hosting environments.</li>
<li>Applications which contain vulnerabilities that allow their own code to be modified.</li>
<li>Environments in which untrusted non-root users can modify application code.</li>
</ul>

<p>Affected users are advised to upgrade to 4.0.0 RC 4.</p>

<h2>Affected versions</h2>

<ul>
<li>Phusion Passenger open source 4.0.0 beta 1</li>
<li>Phusion Passenger open source 4.0.0 beta 2</li>
<li>Phusion Passenger Enterprise 4.0.0 beta 1</li>
<li>Phusion Passenger Enterprise 4.0.0 beta 2</li>
</ul>

<h2>Unaffected versions</h2>

<ul>
<li>Phusion Passenger open source 3.x and earlier</li>
<li>Phusion Passenger open source 4.0.0 RC 1 and later</li>
<li>Phusion Passenger Enterprise 3.x and earlier</li>
<li>Phusion Passenger Enterprise 4.0.0 RC 1 and later</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.phusion.nl/2013/03/05/phusion-passenger-4-0-beta-1-and-2-arbitrary-file-deletion-vulnerability/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Phusion Passenger 4.0 Release Candidate 4</title>
		<link>http://blog.phusion.nl/2013/03/05/phusion-passenger-4-0-release-candidate-4/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=phusion-passenger-4-0-release-candidate-4</link>
		<comments>http://blog.phusion.nl/2013/03/05/phusion-passenger-4-0-release-candidate-4/#comments</comments>
		<pubDate>Tue, 05 Mar 2013 11:08:29 +0000</pubDate>
		<dc:creator>Hongli Lai</dc:creator>
				<category><![CDATA[Phusion Passenger]]></category>
		<category><![CDATA[Phusion Passenger 4]]></category>
		<category><![CDATA[Phusion Passenger Technology Previews]]></category>

		<guid isPermaLink="false">http://blog.phusion.nl/?p=3446</guid>
		<description><![CDATA[Phusion Passenger turns Apache and Nginx into a full-featured application server for Ruby and Python web apps. It has a strong focus on ease of use, stability and performance. Phusion Passenger is built on top of tried-and-true, battle-hardened Unix technologies, yet at the same time introduces innovations not found in most traditional Unix servers. Since [...]]]></description>
				<content:encoded><![CDATA[<p><a href="https://www.phusionpassenger.com/"><img src="http://blog.phusion.nl/wp-content/uploads/2012/07/Passenger_chair_256x256.jpg" width="160" height="160" class="float-right"></a>
<em><a href="https://www.phusionpassenger.com/">Phusion Passenger</a> turns Apache and Nginx into a full-featured application server for Ruby and Python web apps. It has a strong focus on ease of use, stability and performance. Phusion Passenger is built on top of tried-and-true, battle-hardened Unix technologies, yet at the same time introduces innovations not found in most traditional Unix servers. Since mid-2012, it aims to be the ultimate polyglot application server.</em></p>

<p>Today we are pleased to announce <strong>Release Candidate 4</strong> of Phusion Passenger 4.0. Last week we said that the open source release of Release Candidate 1 will be out today. However because of the helpful feedback and bug reports we&#8217;ve received from <a href="https://www.phusionpassenger.com/enterprise">Enterprise</a> customers, we&#8217;ve decided to push out these bug fixes to the open source version earlier. Release Candidate 3 was only available for Enterprise customers in order to test bug fixes, so it hasn&#8217;t been announced publicly.</p>

<p>The 4.x series is a huge improvement over the 3.x series: during the development of 4.0, we&#8217;ve introduced a myriad of changes which we&#8217;ve covered in past beta preview articles:</p>

<ul>
<li><a href="http://blog.phusion.nl/2012/10/24/phusion-passenger-4-0-beta-1-is-here/">Support for multiple Ruby versions, support for Python WSGI, multithreading, evented core similar to Nginx and Node.js, real-time response buffering, improved zero-copy architecture, better error diagnostics.</a></li>
<li><a href="http://blog.phusion.nl/2012/10/30/phusion-passenger-4-0-supports-jruby-rubinius/">JRuby and Rubinius support.</a></li>
<li><a href="http://blog.phusion.nl/2013/01/22/phusion-passenger-4-technology-preview-out-of-band-work/">Out-of-Band Work.</a></li>
<li><a href="http://blog.phusion.nl/2013/01/23/the-new-rack-socket-hijacking-api/">Support for the Rack socket hijacking API</a></li>
<li><a href="http://blog.phusion.nl/2013/01/24/phusion-passenger-4-0-beta-2-syscall-failure-simulation-framework-focus-on-stability/">Improved stability and test suite</a>.</li>
</ul>

<h2>Changes in 4.0 RC 3 and RC 4</h2>

<p>The focus of RC 3 and RC 4 have yet again been on improving stability. We&#8217;ve <strong>closed over 50 issues</strong> in our <a href="http://code.google.com/p/phusion-passenger/issues/list">issue tracker</a>.</p>

<p>The most important changes in RC 3 and RC 4 are as follows:</p>

<ul>
<li>Fixed Rake autodetection.</li>
<li>Fixed compilation on systems where /tmp is mounted noexec.</li>
<li>Fixed some memory corruption bugs.</li>
<li>Phusion Passenger Standalone now sets <code>underscores_in_headers</code>. Fixes <a href="http://code.google.com/p/phusion-passenger/issues/detail?id=708">issue #708</a>.</li>
<li>Fixed some process spawning compatibility problems, as reported in <a href="http://code.google.com/p/phusion-passenger/issues/detail?id=842">issue #842</a>.</li>
<li>The Python WSGI loader now correctly shuts down client sockets even when there are child processes that keep the socket open.</li>
<li>A new configuration option <code>PassengerPython</code> (Apache) and <code>passenger_python</code> (Nginx) has been added so that users can customize the Python interpreter on a per-application basis. Fixes <a href="http://code.google.com/p/phusion-passenger/issues/detail?id=852">issue #852</a>.</li>
<li>The Apache module now supports file uploads larger than 2 GB when on 32-bit systems. Fixes <a href="http://code.google.com/p/phusion-passenger/issues/detail?id=838">issue #838</a>.</li>
<li>The Nginx version now supports the <code>passenger_temp_dir</code> option.</li>
<li>Environment variables set in the Nginx configuration file (through the <code>env</code> config option) are now correctly passed to all application processes. Fixes <a href="http://code.google.com/p/phusion-passenger/issues/detail?id=371">issue #371</a>.</li>
<li>Fixed support for RVM mixed mode installations. Fixes <a href="http://code.google.com/p/phusion-passenger/issues/detail?id=828">issue #828</a>.</li>
<li>Phusion Passenger now outputs the Date HTTP header in case the application didn&#8217;t already do that (and was violating the HTTP spec). Fixes <a href="http://code.google.com/p/phusion-passenger/issues/detail?id=485">issue #485</a>.</li>
<li>Phusion Passenger now checks whether /dev/urandom isn&#8217;t broken. Fixes <a href="http://code.google.com/p/phusion-passenger/issues/detail?id=516">issue #516</a>.</li>
<li>Improved debugging messages.</li>
</ul>

<h2>Installing and testing 4.0.0 Release Candidate 4</h2>

<h3>Quick install</h3>

<p><a href="https://www.phusionpassenger.com/enterprise">Phusion Passenger Enterprise</a> users can download the Enterprise version of 4.0 RC 4 from the <a href="https://www.phusionpassenger.com/orders">Customer Area</a>.</p>

<p>Open source users can install the open source version of 4.0 RC 4 with the following commands:</p>

<pre><code>gem install passenger --pre
passenger-install-apache2-module
passenger-install-nginx-module
</code></pre>

<p>You can also download the tarball at <a href="http://phusion-passenger.googlecode.com/files/passenger-4.0.0.rc4.tar.gz">Google Code</a>.</p>

<h3>In-depth</h3>

<p>In-depth installation and upgrade instructions can be found in the Installation section of the documentation. The documentation has been updated to cover 4.0 changes, including Enterprise features. You can view them online here:</p>

<ul>
<li><a href="http://www.modrails.com/documentation/Users%20guide%20Apache.html">Apache manual</a></li>
<li><a href="http://www.modrails.com/documentation/Users%20guide%20Nginx.html">Nginx manual</a></li>
</ul>

<h2>Final</h2>

<p>We are excited about the final release. You can help us by testing RC 4 and reporting any bugs. Please submit bug reports to our <a href="http://code.google.com/p/phusion-passenger/issues/list">bug tracker</a>.</p>

<!-- Begin MailChimp Signup Form -->

<div id="mc_embed_signup" style="background: #ffffcc; padding: 1em 1em 0.01em 1em; border: solid 1px #ffe000">
  We at Phusion are regularly updating our products. Want to stay up to date? Fill in your name and email address below and sign up for our newsletter. We won&#8217;t spam you, we promise.
  <form action="http://phusion.us5.list-manage.com/subscribe/post?u=9798cf0716b767b7c062d0f6f&amp;id=960849cbbe" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" style="margin-top: 1em">
    <div class="mc-field-group">
      <label for="mce-EMAIL">Email address</label><br />
      <input type="email" value="" name="EMAIL" class="required email" id="mce-EMAIL">
    </div>
    <div class="mc-field-group">
      <label for="mce-FNAME">First and last name</label><br />
      <input type="text" value="" name="FNAME" class="required" id="mce-FNAME"><input type="text" value="" name="LNAME" class="required" id="mce-LNAME">
    </div>
    <div id="mce-responses" class="clear">
      <div class="response" id="mce-error-response" style="display:none"></div>
      <div class="response" id="mce-success-response" style="display:none"></div>
    </div>
    <div class="clear" style="margin: 1em 0 1em 0"><input type="submit" value="Subscribe" name="subscribe" id="mc-embedded-subscribe" class="button"></div>
  </form>
</div>

<!--End mc_embed_signup-->
]]></content:encoded>
			<wfw:commentRss>http://blog.phusion.nl/2013/03/05/phusion-passenger-4-0-release-candidate-4/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Phusion Passenger 4.0 Release Candidate 2</title>
		<link>http://blog.phusion.nl/2013/02/27/phusion-passenger-4-0-release-candidate-2/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=phusion-passenger-4-0-release-candidate-2</link>
		<comments>http://blog.phusion.nl/2013/02/27/phusion-passenger-4-0-release-candidate-2/#comments</comments>
		<pubDate>Wed, 27 Feb 2013 14:00:36 +0000</pubDate>
		<dc:creator>Hongli Lai</dc:creator>
				<category><![CDATA[Phusion Passenger]]></category>
		<category><![CDATA[Phusion Passenger 4]]></category>
		<category><![CDATA[Phusion Passenger Technology Previews]]></category>

		<guid isPermaLink="false">http://blog.phusion.nl/?p=3316</guid>
		<description><![CDATA[Phusion Passenger is an Apache and Nginx module for deploying Ruby and Python web applications. It has a strong focus on ease of use, stability and performance. Phusion Passenger is built on top of tried-and-true, battle-hardened Unix technologies, yet at the same time introduces innovations not found in most traditional Unix servers. Since mid-2012, it [...]]]></description>
				<content:encoded><![CDATA[<p><a href="https://www.phusionpassenger.com/"><img src="http://blog.phusion.nl/wp-content/uploads/2012/07/Passenger_chair_256x256.jpg" width="160" height="160" class="float-right"></a>
<em><a href="https://www.phusionpassenger.com/">Phusion Passenger</a> is an Apache and Nginx module for deploying Ruby and Python web applications. It has a strong focus on ease of use, stability and performance. Phusion Passenger is built on top of tried-and-true, battle-hardened Unix technologies, yet at the same time introduces innovations not found in most traditional Unix servers. Since mid-2012, it aims to be the ultimate polyglot application server.</em></p>

<p>We know many users are eagerly awaiting the final release of Phusion Passenger 4.0. The 4.x series is a huge improvement over the 3.x series: during the development of 4.0, we&#8217;ve introduced a myriad of changes which we&#8217;ve covered in past beta preview articles:</p>

<ul>
<li><a href="http://blog.phusion.nl/2012/10/24/phusion-passenger-4-0-beta-1-is-here/">Beta 1</a>: support for multiple Ruby versions, support for Python WSGI, multithreading (<a href="https://www.phusionpassenger.com/enterprise">an Enterprise only feature</a>), evented core similar to Nginx and Node.js, real-time response buffering, improved zero-copy architecture, better error diagnostics.</li>
<li>Beta 2:

<ul>
<li><a href="http://blog.phusion.nl/2012/10/30/phusion-passenger-4-0-supports-jruby-rubinius/">JRuby and Rubinius support.</a></li>
<li><a href="http://blog.phusion.nl/2013/01/22/phusion-passenger-4-technology-preview-out-of-band-work/">Out-of-Band Work.</a></li>
<li><a href="http://blog.phusion.nl/2013/01/23/the-new-rack-socket-hijacking-api/">Support for the Rack socket hijacking API</a></li>
<li><a href="http://blog.phusion.nl/2013/01/24/phusion-passenger-4-0-beta-2-syscall-failure-simulation-framework-focus-on-stability/">Improved stability and test suite</a>.</li>
</ul></li>
</ul>

<p>Today we are proud to announce <strong>Release Candidate 2</strong> of Phusion Passenger 4.0. Release Candidate 1 has been skipped because a few bug fixes were applied right after RC 1 was tagged.</p>

<h2>Changes in 4.0 RC 1 and RC 2</h2>

<p>The focus of RC 1 and RC 2 have been on improving stability and on refining previously introduced features. We&#8217;ve <strong>closed over 100 issues</strong> in our <a href="http://code.google.com/p/phusion-passenger/issues/list">issue tracker</a>. We couldn&#8217;t have done this without the fantastic feedback from our users, especially those from many <a href="https://www.phusionpassenger.com/enterprise">Phusion Passenger Enterprise</a> customers who have beta tested the RC previews in their staging environments.</p>

<p>The changes in RC 1 and RC 2 are as follows:</p>

<ul>
<li>The Nginx version now supports the <code>passenger_app_root</code> configuration option.</li>
<li>The <a href="https://www.phusionpassenger.com/enterprise">Enterprise</a> memory limiting feature has been extended to work with non-Ruby applications as well.</li>
<li>Application processes that have been killed are now automatically detected within 5 seconds. Previously Phusion Passenger needed to send a request to the process before detecting that it&#8217;s gone. This change means that when you kill a process by sending it a signal, Phusion Passenger will automatically respawn it within 5 seconds (provided that the process limit settings allow respawning).</li>
<li>Phusion Passenger Standalone&#8217;s HTTP client body limit has been raised from 50 MB to 1 GB.</li>
<li>Python 3 support has been added.</li>
<li>The build system has been made compatible with JRuby and Ruby 2.0. This does not mean that Phusion Passenger works on Ruby 2.0; please read on for more about this subject.</li>
<li>The installers now print a lot more information about detected system settings so that the user can see  whether something has been wrongly detected.</li>
<li>Some performance optimizations. These involve further extending the zero-copy architecture, and the use of hash table maps instead of binary tree maps.</li>
<li>Many potential crasher and freezer bugs have been fixed.</li>
<li>Error diagnostics have been further improved.</li>
<li>Many documentation improvements.</li>
</ul>

<h3>What about Ruby 2.0?</h3>

<p>We are just as excited about Ruby 2.0 as many of you are. Since 2.0 was released a few days ago, we&#8217;ve been testing Phusion Passenger on it. We really wanted to release RC 2 with Ruby 2.0 support, but a few things stood in our way so we had to postpone this goal.</p>

<ul>
<li>We couldn&#8217;t get Ruby 2.0.0 installed on OS X Mountain Lion. The compiled Ruby crashes during Ruby 2.0.0&#8242;s build process with a low-level error (<em>[BUG] Stack consistency error</em>). Apparently <a href="http://stackoverflow.com/questions/15064626/ruby-2-0-0-rvm-fails-compilation-os-x-10-8-2-mountain-lion">we aren&#8217;t the only ones</a>.</li>
<li>We were able to get it installed on a Debian VM, but it does not pass all the Phusion Passenger unit tests. It fails on some tests with obscure errors that seem to indicate bugs in Ruby, e.g. errors in which Ruby cannot figure out where the exception came from.</li>
</ul>

<p>We recommend sticking with 1.9.3 in the mean time until the next Ruby 2.0 patchlevel release.</p>

<h2>Release Candidate 2 timeline &amp; download</h2>

<p><a href="https://www.phusionpassenger.com/enterprise">Phusion Passenger Enterprise</a> customers are given <strong>priority access</strong> to Release Candidate 2. They can download RC 2 from the <a href="https://www.phusionpassenger.com/orders">Customer Area</a> immediately.</p>

<div style="text-align: center"><a href="https://www.phusionpassenger.com/orders"><img src="http://blog.phusion.nl/wp-content/uploads/2013/02/passenger_enterprise_download_button.jpg" alt="Phusion Passenger Enterprise customers: download RC 2 from Customer Area" width="485" height="250" class="alignnone size-full wp-image-3328" /></a></div>

<p>The release of the open source version will follow in one week, on <strong>March 5 2013</strong>. Of course, open source users who want to stay on the bleeding edge are free to obtain the latest sources from the open source Phusion Passenger git repository at any time.</p>

<p>When the open source version is released, users can install it by following the in-depth installation and upgrade instructions in the Installation section of the documentation. The manual also covers installation of beta releases.</p>

<ul>
<li><a href="http://www.modrails.com/documentation/Users%20guide%20Apache.html">Apache manual</a></li>
<li><a href="http://www.modrails.com/documentation/Users%20guide%20Nginx.html">Nginx manual</a></li>
</ul>

<h2>Final</h2>

<p>We are excited about the final release. You can help us by testing RC 2 and reporting any bugs. Please submit bug reports to our <a href="http://code.google.com/p/phusion-passenger/issues/list">bug tracker</a>.</p>

<!-- Begin MailChimp Signup Form -->

<div id="mc_embed_signup" style="background: #ffffcc; padding: 1em 1em 0.01em 1em; border: solid 1px #ffe000">
  We at Phusion are regularly updating our products. Want to stay up to date? Fill in your name and email address below and sign up for our newsletter. We won&#8217;t spam you, we promise.
  <form action="http://phusion.us5.list-manage.com/subscribe/post?u=9798cf0716b767b7c062d0f6f&amp;id=960849cbbe" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" style="margin-top: 1em">
    <div class="mc-field-group">
      <label for="mce-EMAIL">Email address</label><br />
      <input type="email" value="" name="EMAIL" class="required email" id="mce-EMAIL">
    </div>
    <div class="mc-field-group">
      <label for="mce-FNAME">First and last name</label><br />
      <input type="text" value="" name="FNAME" class="required" id="mce-FNAME"><input type="text" value="" name="LNAME" class="required" id="mce-LNAME">
    </div>
    <div id="mce-responses" class="clear">
      <div class="response" id="mce-error-response" style="display:none"></div>
      <div class="response" id="mce-success-response" style="display:none"></div>
    </div>
    <div class="clear" style="margin: 1em 0 1em 0"><input type="submit" value="Subscribe" name="subscribe" id="mc-embedded-subscribe" class="button"></div>
  </form>
</div>

<!--End mc_embed_signup-->
]]></content:encoded>
			<wfw:commentRss>http://blog.phusion.nl/2013/02/27/phusion-passenger-4-0-release-candidate-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Phusion Passenger 4.0 beta 2: Syscall failure simulation framework, focus on stability</title>
		<link>http://blog.phusion.nl/2013/01/24/phusion-passenger-4-0-beta-2-syscall-failure-simulation-framework-focus-on-stability/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=phusion-passenger-4-0-beta-2-syscall-failure-simulation-framework-focus-on-stability</link>
		<comments>http://blog.phusion.nl/2013/01/24/phusion-passenger-4-0-beta-2-syscall-failure-simulation-framework-focus-on-stability/#comments</comments>
		<pubDate>Thu, 24 Jan 2013 14:25:00 +0000</pubDate>
		<dc:creator>Hongli Lai</dc:creator>
				<category><![CDATA[Phusion Passenger]]></category>
		<category><![CDATA[Phusion Passenger 4]]></category>
		<category><![CDATA[Phusion Passenger Technology Previews]]></category>

		<guid isPermaLink="false">http://blog.phusion.nl/?p=3199</guid>
		<description><![CDATA[Phusion Passenger is an Apache and Nginx module for deploying Ruby and Python web applications. It has a strong focus on ease of use, stability and performance. Phusion Passenger is built on top of tried-and-true, battle-hardened Unix technologies, yet at the same time introduces innovations not found in most traditional Unix servers. Since mid-2012, it [...]]]></description>
				<content:encoded><![CDATA[<p><a href="https://www.phusionpassenger.com/"><img src="http://blog.phusion.nl/wp-content/uploads/2012/07/Passenger_chair_256x256.jpg" width="160" height="160" class="float-right"></a>
<em><a href="https://www.phusionpassenger.com/">Phusion Passenger</a> is an Apache and Nginx module for deploying Ruby and Python web applications. It has a strong focus on ease of use, stability and performance. Phusion Passenger is built on top of tried-and-true, battle-hardened Unix technologies, yet at the same time introduces innovations not found in most traditional Unix servers. Since mid-2012, it aims to be the ultimate polyglot application server.</em></p>

<p>Development of the Phusion Passenger 4.x series is progressing steadily. The 4.x series is a huge improvement over the 3.x series: in <a href="http://blog.phusion.nl/2012/10/24/phusion-passenger-4-0-beta-1-is-here/">the announcement for Phusion Passenger 4.0.0 beta 1</a>, we introduced a myriad of changes such as support for multiple Ruby versions, Python WSGI support, multithreading (<a href="https://www.phusionpassenger.com/enterprise">Enterprise only</a>), improved zero-copy architecture, better error diagnostics and more. That was just the beginning, because soon after we <a href="http://blog.phusion.nl/2012/10/30/phusion-passenger-4-0-supports-jruby-rubinius/">announced JRuby and Rubinius support</a>, <a href="http://blog.phusion.nl/2013/01/22/phusion-passenger-4-technology-preview-out-of-band-work/">Out-of-Band Work</a> and <a href="http://blog.phusion.nl/2013/01/23/the-new-rack-socket-hijacking-api/">the Rack socket hijacking API</a>.</p>

<p>Today we are proud to announce <strong>Phusion Passenger 4.0 beta 2</strong>, which brings us closer to a final release.</p>

<h2>Better stability, documentation, test coverage</h2>

<p>Beta 1 was usable, but not yet production-ready. While it worked well most of the time, there were some bugs that could cause crashes. So for beta 2 we haven&#8217;t introduced too many new features. Instead we&#8217;ve been focussing a lot on fixing bugs, improving stability, improving documentation and improving test coverage. It is easy to fall into the trap of constantly adding features, but we want a rock-solid product that our users and customers can rely on.</p>

<p>How do we ensure quality? There are a few tools and techniques that we use:</p>

<h3>System call failure simulation framework</h3>

<div class="float-right" style="text-align: center"><a href="http://www.sqlite.org/"><img src="http://blog.phusion.nl/wp-content/uploads/2013/01/sqlite370_banner.gif" alt="SQLite" width="220" height="101" class="alignnone size-full wp-image-3183" /></a><br /><em>Our inspiration</em></div>

<p>The <a href="https://github.com/FooBarWidget/passenger/blob/master/doc/DebuggingAndStressTesting.md#simulating-system-call-failures">system call failure simulation framework</a> is a new developer feature in 4.0 beta 2 and allows us to simulate random system call failures so that we can test whether error handling in Phusion Passenger is done correctly. Although we already test for many error handling scenarios in our unit tests, test coverage is not perfect. This framework gives us another tool to ensure quality.</p>

<p>A few months ago we sat down with a customer who was experiencing seemingly random crashes with Phusion Passenger. These crashes could not be reproduced on any of our systems, but could be reliably reproduced on theirs. The crashes would only manifest under high concurrency scenarios. After a day of intensive investigation, we found that the crash was caused because their systems&#8217; file descriptor limit is much lower than any of our systems&#8217;. Phusion Passenger did not always catch out-of-file-descriptors errors, so those errors caused Phusion Passenger to crash. Due to other unrelated issues, relevant error messages could not be printed to the log file and were lost.</p>

<p>All of those issues have since been fixed, but it made us realize that our testing tools were not adequate. That situation <strong>could and should have been prevented</strong>. Thus, the system call failure simulation framework was born. This framework allows us to specify which system calls should fail, and with what probability. For example, the following configuration simulates the &#8220;out of file descriptors&#8221; error in the helper agent with a probability of 1%.</p>

<pre><code>export PASSENGER_SIMULATE_SYSCALL_FAILURES=PassengerHelperAgent=ENFILES=0.01
</code></pre>

<p>Different runs will produce different errors, but you can force determinism by specifying the same random seed that was used in the last run. The random seed is printed as a debugging message during startup and during crash.</p>

<pre><code>export PASSENGER_RANDOM_SEED=...
</code></pre>

<p>The system call failure simulation framework was inspired by <a href="http://www.sqlite.org/testing.html">SQLite&#8217;s testing process</a>. Real hardware, network or OS-level errors are difficult to create, so simulating them is the next best thing. SQLite has an internal virtual filesystem layer, and it is in that layer that they simulate failures. In our case we have a similar layer, namely the <a href="https://github.com/FooBarWidget/passenger/blob/master/ext/oxt/system_calls.hpp">system call interruption framework</a> which was originally written to facilitate interrupting threads that are blocked on blocking system calls.</p>

<h3>Continuously expanding and improving our test suite</h3>

<p>We already had an extensive <a href="https://github.com/FooBarWidget/passenger/tree/master/test">test suite</a> which consists of a hybrid of C++ and Ruby RSpec code. In 4.0 beta 2 we&#8217;ve improved the test suite by modernizing some dependencies, testing more edge cases, testing more failure conditions, etc.</p>

<h3>Setting up Continuous integration</h3>

<p>Before today our extensive <a href="https://github.com/FooBarWidget/passenger/tree/master/test">test suite</a> was run on our development machines as well as an army of virtual machines with different OSes. We have now setup <a href="https://travis-ci.org/FooBarWidget/passenger">Travis CI</a> so that we would have an additional quality assurance tool. The test suite has also been extended to cover more cases.</p>

<h2>Ruby 1.8 is now considered legacy</h2>

<p><img src="http://blog.phusion.nl/wp-content/uploads/2013/01/ruby.png" alt="Ruby 1.9 is the future" width="152" height="151" class="alignnone size-full wp-image-3190 float-right" />
Ruby 1.8 is no longer supported by its authors, and Ruby Enterprise Edition has been End-Of-Lifed a while ago. Many gems these days are Ruby 1.9-only. It is more than apparent that Ruby 1.8 is considered legacy by the community, and for good reasons. We too are joining the community by considering Ruby 1.8 legacy. This has the following implications:</p>

<ul>
<li>Phusion Passenger 4.x will continue to support Ruby 1.8. Our support goes as far back as Ruby 1.8.5.</li>
<li>We will optimize performance for Ruby 1.9. Phusion Passenger will still work on Ruby 1.8, but we will no longer put in any effort to make it work <em>fast</em> on Ruby 1.8.</li>
</ul>

<h2>Installing and testing 4.0.0 beta 2</h2>

<h3>Quick install</h3>

<p><a href="https://www.phusionpassenger.com/enterprise">Phusion Passenger Enterprise</a> users can download the Enterprise version of 4.0 beta 2 from the <a href="https://www.phusionpassenger.com/orders">Customer Area</a>.</p>

<p>Open source users can install the open source version of 4.0 beta 2 with the following commands:</p>

<pre><code>gem install passenger --pre
passenger-install-apache2-module
passenger-install-nginx-module
</code></pre>

<p>You can also download the tarball at <a href="http://phusion-passenger.googlecode.com/files/passenger-3.9.2.beta.tar.gz">Google Code</a>.</p>

<h3>In-depth</h3>

<p>In-depth installation and upgrade instructions can be found in the Installation section of the documentation. The documentation has been updated to cover 4.0 changes, including Enterprise features. You can view them online here:</p>

<ul>
<li><a href="http://www.modrails.com/documentation/Users%20guide%20Apache.html">Apache manual</a></li>
<li><a href="http://www.modrails.com/documentation/Users%20guide%20Nginx.html">Nginx manual</a></li>
</ul>

<h2>Final</h2>

<p>We are excited about the final release. You can help us by testing beta 2 and reporting any bugs. Please submit bug reports to our <a href="http://code.google.com/p/phusion-passenger/issues/list">bug tracker</a>.</p>

<!-- Begin MailChimp Signup Form -->

<div id="mc_embed_signup" style="background: #ffffcc; padding: 1em 1em 0.01em 1em; border: solid 1px #ffe000">
  We at Phusion are regularly updating our products. Want to stay up to date? Fill in your name and email address below and sign up for our newsletter. We won&#8217;t spam you, we promise.
  <form action="http://phusion.us5.list-manage.com/subscribe/post?u=9798cf0716b767b7c062d0f6f&amp;id=960849cbbe" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" style="margin-top: 1em">
    <div class="mc-field-group">
      <label for="mce-EMAIL">Email address</label><br />
      <input type="email" value="" name="EMAIL" class="required email" id="mce-EMAIL">
    </div>
    <div class="mc-field-group">
      <label for="mce-FNAME">First and last name</label><br />
      <input type="text" value="" name="FNAME" class="required" id="mce-FNAME"><input type="text" value="" name="LNAME" class="required" id="mce-LNAME">
    </div>
    <div id="mce-responses" class="clear">
      <div class="response" id="mce-error-response" style="display:none"></div>
      <div class="response" id="mce-success-response" style="display:none"></div>
    </div>
    <div class="clear" style="margin: 1em 0 1em 0"><input type="submit" value="Subscribe" name="subscribe" id="mc-embedded-subscribe" class="button"></div>
  </form>
</div>

<!--End mc_embed_signup-->
]]></content:encoded>
			<wfw:commentRss>http://blog.phusion.nl/2013/01/24/phusion-passenger-4-0-beta-2-syscall-failure-simulation-framework-focus-on-stability/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
