<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Potential problems with preforking Ruby on Rails</title>
	<atom:link href="http://izumi.plan99.net/blog/index.php/2007/04/05/problems-with-preforking-ruby-on-rails/feed/" rel="self" type="application/rss+xml" />
	<link>http://izumi.plan99.net/blog/index.php/2007/04/05/problems-with-preforking-ruby-on-rails/</link>
	<description>Ecchi nanowa ikenai to omoimasu</description>
	<lastBuildDate>Tue, 03 Jan 2012 16:14:50 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: James Pharaoh</title>
		<link>http://izumi.plan99.net/blog/index.php/2007/04/05/problems-with-preforking-ruby-on-rails/comment-page-1/#comment-10113</link>
		<dc:creator>James Pharaoh</dc:creator>
		<pubDate>Tue, 12 Jul 2011 07:16:57 +0000</pubDate>
		<guid isPermaLink="false">http://izumi.plan99.net/blog/?p=25#comment-10113</guid>
		<description>Leaking IO handles is a problem I&#039;ve had, and generally it&#039;s only a problem when the child process is a daemon. For example, I start a background process from a web server, then the web server ends. The child process inherited the open server socket from the web server and still has it open. The web server can now not start again because the socket can&#039;t be reopened on the same port. There are many simiilar situation which can arise from the same.

This isn&#039;t really a ruby thing but a general unix processes thing. Basically you need to close any open IO handles after forking before executing a new process.</description>
		<content:encoded><![CDATA[<p>Leaking IO handles is a problem I&#8217;ve had, and generally it&#8217;s only a problem when the child process is a daemon. For example, I start a background process from a web server, then the web server ends. The child process inherited the open server socket from the web server and still has it open. The web server can now not start again because the socket can&#8217;t be reopened on the same port. There are many simiilar situation which can arise from the same.</p>
<p>This isn&#8217;t really a ruby thing but a general unix processes thing. Basically you need to close any open IO handles after forking before executing a new process.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hongli</title>
		<link>http://izumi.plan99.net/blog/index.php/2007/04/05/problems-with-preforking-ruby-on-rails/comment-page-1/#comment-7452</link>
		<dc:creator>Hongli</dc:creator>
		<pubDate>Thu, 06 Dec 2007 20:57:50 +0000</pubDate>
		<guid isPermaLink="false">http://izumi.plan99.net/blog/?p=25#comment-7452</guid>
		<description>Jenn, what &quot;potential risks&quot; are you talking about? Forking is a well-known and well-understood concept. Whatever problems that may arise are simply implementation issues that can be fixed. It&#039;s not black magic.</description>
		<content:encoded><![CDATA[<p>Jenn, what &#8220;potential risks&#8221; are you talking about? Forking is a well-known and well-understood concept. Whatever problems that may arise are simply implementation issues that can be fixed. It&#8217;s not black magic.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ruby Developer</title>
		<link>http://izumi.plan99.net/blog/index.php/2007/04/05/problems-with-preforking-ruby-on-rails/comment-page-1/#comment-7449</link>
		<dc:creator>Ruby Developer</dc:creator>
		<pubDate>Thu, 06 Dec 2007 19:16:24 +0000</pubDate>
		<guid isPermaLink="false">http://izumi.plan99.net/blog/?p=25#comment-7449</guid>
		<description>I don&#039;t think there are potential risks are worth it. Let&#039;s stay away from Forking people, unless you want to spend endless nights of Christmas fixing stuff.

Jenn</description>
		<content:encoded><![CDATA[<p>I don&#8217;t think there are potential risks are worth it. Let&#8217;s stay away from Forking people, unless you want to spend endless nights of Christmas fixing stuff.</p>
<p>Jenn</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ruby Garbage Collection Links &#171; Open Source Teddy Bears</title>
		<link>http://izumi.plan99.net/blog/index.php/2007/04/05/problems-with-preforking-ruby-on-rails/comment-page-1/#comment-6524</link>
		<dc:creator>Ruby Garbage Collection Links &#171; Open Source Teddy Bears</dc:creator>
		<pubDate>Mon, 25 Jun 2007 07:44:48 +0000</pubDate>
		<guid isPermaLink="false">http://izumi.plan99.net/blog/?p=25#comment-6524</guid>
		<description>[...] * Hongli Lai [...]</description>
		<content:encoded><![CDATA[<p>[...] * Hongli Lai [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hongli</title>
		<link>http://izumi.plan99.net/blog/index.php/2007/04/05/problems-with-preforking-ruby-on-rails/comment-page-1/#comment-6504</link>
		<dc:creator>Hongli</dc:creator>
		<pubDate>Tue, 29 May 2007 23:02:22 +0000</pubDate>
		<guid isPermaLink="false">http://izumi.plan99.net/blog/?p=25#comment-6504</guid>
		<description>What I do is forking before any requests (but after Rails has been loaded). Wouldn&#039;t that solve all problems?</description>
		<content:encoded><![CDATA[<p>What I do is forking before any requests (but after Rails has been loaded). Wouldn&#8217;t that solve all problems?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marcin Raczkowski</title>
		<link>http://izumi.plan99.net/blog/index.php/2007/04/05/problems-with-preforking-ruby-on-rails/comment-page-1/#comment-6503</link>
		<dc:creator>Marcin Raczkowski</dc:creator>
		<pubDate>Tue, 29 May 2007 20:41:59 +0000</pubDate>
		<guid isPermaLink="false">http://izumi.plan99.net/blog/?p=25#comment-6503</guid>
		<description>problem with database connections is that when you try to do 2 gueries CONCURENTLY two processes use same descriptor which can cause unexpected behavior - i&#039;m currently working on fixing that isue with my mongrel modiication - it should allow mongrel to fork on request, i&#039;m using your script for preloading - and i&#039;m going to release my modifications on compatibile OS license

greets
Marcin Raczkowski</description>
		<content:encoded><![CDATA[<p>problem with database connections is that when you try to do 2 gueries CONCURENTLY two processes use same descriptor which can cause unexpected behavior &#8211; i&#8217;m currently working on fixing that isue with my mongrel modiication &#8211; it should allow mongrel to fork on request, i&#8217;m using your script for preloading &#8211; and i&#8217;m going to release my modifications on compatibile OS license</p>
<p>greets<br />
Marcin Raczkowski</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: HelloWorld</title>
		<link>http://izumi.plan99.net/blog/index.php/2007/04/05/problems-with-preforking-ruby-on-rails/comment-page-1/#comment-6456</link>
		<dc:creator>HelloWorld</dc:creator>
		<pubDate>Sat, 28 Apr 2007 10:07:49 +0000</pubDate>
		<guid isPermaLink="false">http://izumi.plan99.net/blog/?p=25#comment-6456</guid>
		<description>Peace people 
 
We love you</description>
		<content:encoded><![CDATA[<p>Peace people </p>
<p>We love you</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hongli</title>
		<link>http://izumi.plan99.net/blog/index.php/2007/04/05/problems-with-preforking-ruby-on-rails/comment-page-1/#comment-6396</link>
		<dc:creator>Hongli</dc:creator>
		<pubDate>Thu, 05 Apr 2007 23:40:57 +0000</pubDate>
		<guid isPermaLink="false">http://izumi.plan99.net/blog/?p=25#comment-6396</guid>
		<description>Oops, you&#039;re right, I forgot to disable reloading of classes. I&#039;ve fixed my blog post now, thank you for pointing this out. :) The memory savings turned out to be far better than expected: from 55% to 75%!</description>
		<content:encoded><![CDATA[<p>Oops, you&#8217;re right, I forgot to disable reloading of classes. I&#8217;ve fixed my blog post now, thank you for pointing this out. <img src='http://izumi.plan99.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  The memory savings turned out to be far better than expected: from 55% to 75%!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ezra</title>
		<link>http://izumi.plan99.net/blog/index.php/2007/04/05/problems-with-preforking-ruby-on-rails/comment-page-1/#comment-6395</link>
		<dc:creator>Ezra</dc:creator>
		<pubDate>Thu, 05 Apr 2007 22:01:52 +0000</pubDate>
		<guid isPermaLink="false">http://izumi.plan99.net/blog/?p=25#comment-6395</guid>
		<description>With the rails config settings you showed in your last post:


config.cache_classes     = false
config.whiny_nils        = true
config.breakpoint_server = false
config.action_controller.consider_all_requests_local = true
config.action_controller.perform_caching             = false
config.action_view.cache_template_extensions         = false
config.action_view.debug_rjs                         = false


You are basically running in development mode which means rails does a lot of reloading of classes and db handles on each request. In production mode this does not happen. Please use a standard rails production mode config with caching turned on and try your experiments again. I&#039;m interested to see what you find out.</description>
		<content:encoded><![CDATA[<p>With the rails config settings you showed in your last post:</p>
<p>config.cache_classes     = false<br />
config.whiny_nils        = true<br />
config.breakpoint_server = false<br />
config.action_controller.consider_all_requests_local = true<br />
config.action_controller.perform_caching             = false<br />
config.action_view.cache_template_extensions         = false<br />
config.action_view.debug_rjs                         = false</p>
<p>You are basically running in development mode which means rails does a lot of reloading of classes and db handles on each request. In production mode this does not happen. Please use a standard rails production mode config with caching turned on and try your experiments again. I&#8217;m interested to see what you find out.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

