<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="/stylesheets/rss.css" type="text/css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Juju: mod_fcgid Slow Startup on Ubuntu Fix</title>
    <link>http://juju.org/articles/2006/07/27/mod_fcgid-slow-startup-on-ubuntu-fix</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>Sufficiently Advanced Technology</description>
    <item>
      <title>mod_fcgid Slow Startup on Ubuntu Fix</title>
      <description>&lt;p&gt;I recently switched to using &lt;a href="http://fastcgi.coremail.cn"&gt;mod&lt;em&gt;fcgid&lt;/a&gt; instead of mod&lt;/em&gt;fastcgi.  So far its nice and fast... except for the first hit after a period of inactivity.  This is because fcgid kills off idle processes and it takes an annoyingly long time to start one up on this server.  It turns out there is an option to set a minimum number of processes, however the version of mod_fcgid on Ubuntu Breezy doesn't have it.  Here's how I installed it:&lt;/p&gt;

&lt;p&gt;sudo apt-get install apache2-dev&lt;/p&gt;

&lt;p&gt;Download &lt;a href="http://fastcgi.coremail.cn/download.htm"&gt;mod_fcgid&lt;/a&gt; 1.09 or greater&lt;/p&gt;

&lt;p&gt;Edit it's Makefile and change top_dir = /usr/share/apache2&lt;/p&gt;

&lt;p&gt;make&lt;/p&gt;

&lt;p&gt;cp .libs/mod_fcgid.so /usr/lib/apache2/modules&lt;/p&gt;

&lt;p&gt;Edit /etc/apache2/mods-available/fcgid.conf and add a line that says DefaultMinClassProcessCount 3 and restart apache.&lt;/p&gt;

&lt;p&gt;The first hit after a restart will be slow, but from then on it will maintain at least DefaultMinClassProcessCount processes.&lt;/p&gt;</description>
      <pubDate>Thu, 27 Jul 2006 21:20:00 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:61654cf7-b24e-4731-bbe0-46bd65995e8d</guid>
      <author>Tony Buser</author>
      <link>http://juju.org/articles/2006/07/27/mod_fcgid-slow-startup-on-ubuntu-fix</link>
      <category>Linux</category>
      <category>rails</category>
      <category>fcgid</category>
      <category>apache2</category>
      <category>ubuntu</category>
      <trackback:ping>http://juju.org/articles/trackback/389</trackback:ping>
    </item>
    <item>
      <title>"mod_fcgid Slow Startup on Ubuntu Fix" by Andy</title>
      <description>&lt;p&gt;Thanks for the tip, it really helped out!&lt;/p&gt;

&lt;p&gt;I was using mod_fcgid 1.08, and when I looked at the change list, it looks like the default for 1.09+ should be to have DefaultMinClassProcessCount set to 3, so you might not actually have to make that change in the config files. (I did it anyway, just to be safe, but then again, I do that sort of thing)&lt;/p&gt;</description>
      <pubDate>Mon, 31 Jul 2006 08:59:22 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:6e09d7d8-1676-48ce-b70a-cbd8243b679f</guid>
      <link>http://juju.org/articles/2006/07/27/mod_fcgid-slow-startup-on-ubuntu-fix#comment-390</link>
    </item>
  </channel>
</rss>
