<?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>Handwriting: Server Woes</title>
    <link>http://blog.handwire.com/articles/2006/04/13/server-woes</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>A blog by Handwire</description>
    <item>
      <title>Server Woes</title>
      <description>&lt;p&gt;We have been having a lot of issues with keeping our lighttpd sites up and running on &lt;a href="http://textdrive.com/"&gt;TextDrive&lt;/a&gt; (even with a @reboot cron job set). There is a ruby script called &lt;a href="http://jlaine.net/blog/57/keeping-your-lighttpd-up-on-textdrive-part-ii"&gt;daedalus&lt;/a&gt; that can continually check for your lighttpd process, and if it&amp;#8217;s not found attempt to restart it, but due to overuse the TextDrive admins &lt;a href="http://weblog.textdrive.com/article/185/happy-thanksgiving-daedalus-is-for-dinner"&gt;banned it from their servers&lt;/a&gt;.&lt;/p&gt;


	&lt;p&gt;We decided that the easiest thing to do was just use Ruby&amp;#8217;s own Net::HTTP module to request the headers for our blog every 10 minutes or so. If we don&amp;#8217;t get back a &amp;#8216;HTTP 200&amp;#8217; we know something&amp;#8217;s wrong and run a shell script that SSHs into our server and restarts lighttpd. Since we&amp;#8217;re just requesting the headers the bandwidth won&amp;#8217;t be a problem and the resource load on TextDrive is no more than a regular web request.&lt;/p&gt;


	&lt;p&gt;If you&amp;#8217;d like to use it for yourself, &lt;a href="http://blog.handwire.com/files/ping_textdrive.rb"&gt;feel free&lt;/a&gt;.&lt;/p&gt;</description>
      <pubDate>Thu, 13 Apr 2006 21:35:00 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:0915a7a9-b719-4b8f-a2cd-f04f77e6786d</guid>
      <author>Skip</author>
      <link>http://blog.handwire.com/articles/2006/04/13/server-woes</link>
      <category>textdrive</category>
      <category>ruby</category>
      <category>server</category>
      <category>ssh</category>
      <trackback:ping>http://blog.handwire.com/articles/trackback/56</trackback:ping>
    </item>
  </channel>
</rss>
