Robby on Rails: Lighttpd, crontab, and server rebootsthoughts.sort_by{|t| t[:topic]}.collect tag:www.robbyonrails.com,2005:TypoTypo2006-09-05T22:12:44-04:00Robby Russellurn:uuid:059c659631309d8b554df2d069131a7d2005-12-09T19:41:00-05:002006-09-05T22:12:44-04:00Lighttpd, crontab, and server reboots<p>I’ll be the first to admit that server reboots do happen. Whether they are for planned hardware upgrades or the unexpected runaway <span class="caps">CPU</span> processes…they can cause some problems for your applications.</p>
<p>Recently, we had an unexpected outage on one of our servers and noticed that some of the lighttpd instances were not restarted automatically. I personally went and started up each one manuually and documented who they all were. We wanted to build a nice solution to this… but because every user has their own method of invoking lighttpd and we kind of let you run free with that… the idea to build one init script to meet everyones needs… isn’t currently practical. We want you to have some freedom with that and we can help you along the way. :-)</p>
<p><strong>So… what should you do?</strong></p>
<p>Well, <a href="http://david.planetargon.us">David Gibbons</a> (our <a href="http://www.robbyonrails.com/articles/2005/12/05/another-brick-in-the-wall">new Lead Systems Administrator</a>) has a nice tip on his blog, <a href="http://david.planetargon.us/articles/2005/12/09/a-cool-trick-with-cron">a cool trick with cron</a>.</p>
<p>He shows you how to use the <code>@reboot</code> option in crontab for scheduling scripts to startup on a reboot.</p>
<p>This is great to use and should work if you are a hosting customer at <a href="http://www.planetargon.com"><span class="caps">PLANET ARGON</span></a>. Expect more little tricks like this in the future as David has many up his sleeve. You might want to subscribe to his brand new <a href="http://typo.leetsoft.com">Typo</a> blog <a href="http://david.planetargon.us/xml/rss20/feed.xml"><span class="caps">RSS</span> feed</a>.
;-)</p>
<div class="typocode"><pre><code class="typocode_ruby "><span class="keyword">class </span><span class="class">David</span> <span class="punct"><</span> <span class="constant">ActiveRecord</span><span class="punct">::</span><span class="constant">Base</span>
<span class="ident">has_many</span> <span class="symbol">:tricks</span>
<span class="keyword">end</span></code></pre></div>
<p>Have a great weekend!</p><p>I’ll be the first to admit that server reboots do happen. Whether they are for planned hardware upgrades or the unexpected runaway <span class="caps">CPU</span> processes…they can cause some problems for your applications.</p>
<p>Recently, we had an unexpected outage on one of our servers and noticed that some of the lighttpd instances were not restarted automatically. I personally went and started up each one manuually and documented who they all were. We wanted to build a nice solution to this… but because every user has their own method of invoking lighttpd and we kind of let you run free with that… the idea to build one init script to meet everyones needs… isn’t currently practical. We want you to have some freedom with that and we can help you along the way. :-)</p>
<p><strong>So… what should you do?</strong></p>
<p>Well, <a href="http://david.planetargon.us">David Gibbons</a> (our <a href="http://www.robbyonrails.com/articles/2005/12/05/another-brick-in-the-wall">new Lead Systems Administrator</a>) has a nice tip on his blog, <a href="http://david.planetargon.us/articles/2005/12/09/a-cool-trick-with-cron">a cool trick with cron</a>.</p>
<p>He shows you how to use the <code>@reboot</code> option in crontab for scheduling scripts to startup on a reboot.</p>
<p>This is great to use and should work if you are a hosting customer at <a href="http://www.planetargon.com"><span class="caps">PLANET ARGON</span></a>. Expect more little tricks like this in the future as David has many up his sleeve. You might want to subscribe to his brand new <a href="http://typo.leetsoft.com">Typo</a> blog <a href="http://david.planetargon.us/xml/rss20/feed.xml"><span class="caps">RSS</span> feed</a>.
;-)</p>
<div class="typocode"><pre><code class="typocode_ruby "><span class="keyword">class </span><span class="class">David</span> <span class="punct"><</span> <span class="constant">ActiveRecord</span><span class="punct">::</span><span class="constant">Base</span>
<span class="ident">has_many</span> <span class="symbol">:tricks</span>
<span class="keyword">end</span></code></pre></div>
<p>Have a great weekend!</p>