<?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: Safety nets for your Ruby daemons</title>
	<atom:link href="http://www.opensourcery.co.za/2009/05/13/safety-nets-for-your-ruby-daemons/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.opensourcery.co.za/2009/05/13/safety-nets-for-your-ruby-daemons/</link>
	<description>Wizardry through open source</description>
	<lastBuildDate>Thu, 11 Mar 2010 18:54:20 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: JGeiger</title>
		<link>http://www.opensourcery.co.za/2009/05/13/safety-nets-for-your-ruby-daemons/comment-page-1/#comment-810</link>
		<dc:creator>JGeiger</dc:creator>
		<pubDate>Thu, 11 Mar 2010 18:54:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.opensourcery.co.za/?p=201#comment-810</guid>
		<description>I&#039;m running into an issue with my daemons dying with the AMQP::Buffer::Overflow exceptions. I&#039;m wondering if there is something I can use to test what might be causing it since it&#039;s not an every time thing.

Backtrace:

/opt/local/lib/ruby/gems/1.8/gems/amqp-0.6.7/lib/amqp/buffer.rb:252:in `_read&#039;
/opt/local/lib/ruby/gems/1.8/gems/amqp-0.6.7/lib/amqp/buffer.rb:95:in `read&#039;
/opt/local/lib/ruby/gems/1.8/gems/amqp-0.6.7/lib/amqp/buffer.rb:88:in `map&#039;
/opt/local/lib/ruby/gems/1.8/gems/amqp-0.6.7/lib/amqp/buffer.rb:88:in `read&#039;
/opt/local/lib/ruby/gems/1.8/gems/amqp-0.6.7/lib/amqp/buffer.rb:102:in `read&#039;
/opt/local/lib/ruby/gems/1.8/gems/amqp-0.6.7/lib/amqp/buffer.rb:88:in `map&#039;
/opt/local/lib/ruby/gems/1.8/gems/amqp-0.6.7/lib/amqp/buffer.rb:88:in `read&#039;
/opt/local/lib/ruby/gems/1.8/gems/amqp-0.6.7/lib/amqp/frame.rb:61:in `parse&#039;
/opt/local/lib/ruby/gems/1.8/gems/amqp-0.6.7/lib/amqp/buffer.rb:243:in `extract&#039;
/opt/local/lib/ruby/gems/1.8/gems/amqp-0.6.7/lib/amqp/frame.rb:60:in `parse&#039;
/opt/local/lib/ruby/gems/1.8/gems/amqp-0.6.7/lib/amqp/client.rb:115:in `receive_data&#039;
/opt/local/lib/ruby/gems/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run_machine&#039;
/opt/local/lib/ruby/gems/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run&#039;
/opt/local/lib/ruby/gems/1.8/gems/amqp-0.6.7/lib/amqp.rb:79:in `start&#039;
/opt/local/lib/ruby/gems/1.8/gems/daemon-kit-0.1.8pre/lib/daemon_kit/amqp.rb:35:in `run&#039;
/opt/local/lib/ruby/gems/1.8/gems/daemon-kit-0.1.8pre/lib/daemon_kit/amqp.rb:20:in `run&#039;</description>
		<content:encoded><![CDATA[<p>I&#8217;m running into an issue with my daemons dying with the AMQP::Buffer::Overflow exceptions. I&#8217;m wondering if there is something I can use to test what might be causing it since it&#8217;s not an every time thing.</p>
<p>Backtrace:</p>
<p>/opt/local/lib/ruby/gems/1.8/gems/amqp-0.6.7/lib/amqp/buffer.rb:252:in `_read&#8217;<br />
/opt/local/lib/ruby/gems/1.8/gems/amqp-0.6.7/lib/amqp/buffer.rb:95:in `read&#8217;<br />
/opt/local/lib/ruby/gems/1.8/gems/amqp-0.6.7/lib/amqp/buffer.rb:88:in `map&#8217;<br />
/opt/local/lib/ruby/gems/1.8/gems/amqp-0.6.7/lib/amqp/buffer.rb:88:in `read&#8217;<br />
/opt/local/lib/ruby/gems/1.8/gems/amqp-0.6.7/lib/amqp/buffer.rb:102:in `read&#8217;<br />
/opt/local/lib/ruby/gems/1.8/gems/amqp-0.6.7/lib/amqp/buffer.rb:88:in `map&#8217;<br />
/opt/local/lib/ruby/gems/1.8/gems/amqp-0.6.7/lib/amqp/buffer.rb:88:in `read&#8217;<br />
/opt/local/lib/ruby/gems/1.8/gems/amqp-0.6.7/lib/amqp/frame.rb:61:in `parse&#8217;<br />
/opt/local/lib/ruby/gems/1.8/gems/amqp-0.6.7/lib/amqp/buffer.rb:243:in `extract&#8217;<br />
/opt/local/lib/ruby/gems/1.8/gems/amqp-0.6.7/lib/amqp/frame.rb:60:in `parse&#8217;<br />
/opt/local/lib/ruby/gems/1.8/gems/amqp-0.6.7/lib/amqp/client.rb:115:in `receive_data&#8217;<br />
/opt/local/lib/ruby/gems/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run_machine&#8217;<br />
/opt/local/lib/ruby/gems/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run&#8217;<br />
/opt/local/lib/ruby/gems/1.8/gems/amqp-0.6.7/lib/amqp.rb:79:in `start&#8217;<br />
/opt/local/lib/ruby/gems/1.8/gems/daemon-kit-0.1.8pre/lib/daemon_kit/amqp.rb:35:in `run&#8217;<br />
/opt/local/lib/ruby/gems/1.8/gems/daemon-kit-0.1.8pre/lib/daemon_kit/amqp.rb:20:in `run&#8217;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kenneth Kalmer</title>
		<link>http://www.opensourcery.co.za/2009/05/13/safety-nets-for-your-ruby-daemons/comment-page-1/#comment-399</link>
		<dc:creator>Kenneth Kalmer</dc:creator>
		<pubDate>Mon, 25 May 2009 20:20:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.opensourcery.co.za/?p=201#comment-399</guid>
		<description>I&#039;ve made notes about double checking log file &amp; pid file configurations. Busy with capistrano integration right now...

Thanks for the great feedback so far!</description>
		<content:encoded><![CDATA[<p>I&#8217;ve made notes about double checking log file &#038; pid file configurations. Busy with capistrano integration right now&#8230;</p>
<p>Thanks for the great feedback so far!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sho</title>
		<link>http://www.opensourcery.co.za/2009/05/13/safety-nets-for-your-ruby-daemons/comment-page-1/#comment-398</link>
		<dc:creator>Sho</dc:creator>
		<pubDate>Mon, 25 May 2009 18:57:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.opensourcery.co.za/?p=201#comment-398</guid>
		<description>Upon further reflection, I think that trying to write out-of-working-directory log files from a gem&#039;d daemon is probably a waste of effort. I mean, you&#039;d have to elevate permissions to write to /var anyway, then presumably drop permissions to actually run .. sounds like a lot of complexity for not much gain. I can&#039;t think of any other library that does that. Mongrel, etc, rely on a naive approach where you either supply the log and pid locations as args or it just writes in the current WD.

As an unprivileged user you could write a pidfile into /tmp easily enough, but that doesn&#039;t solve the logging problem. I suspect the &quot;solution&quot; would be that if you don&#039;t supply a writable log file as an arg to the start command (or in config.yml), logging is disabled. But really, I&#039;m not even sure that is worth the trouble. The whole thing is really designed to be run in place. Trying to make it gem-able just sounds like a recipe for complexity, fragility and disaster. Methinks deployment strategies, like you said, will revolve around cap et al rather than rubygems.

Meditate on this I will, but I suspect I&#039;ve answered my own question ...</description>
		<content:encoded><![CDATA[<p>Upon further reflection, I think that trying to write out-of-working-directory log files from a gem&#8217;d daemon is probably a waste of effort. I mean, you&#8217;d have to elevate permissions to write to /var anyway, then presumably drop permissions to actually run .. sounds like a lot of complexity for not much gain. I can&#8217;t think of any other library that does that. Mongrel, etc, rely on a naive approach where you either supply the log and pid locations as args or it just writes in the current WD.</p>
<p>As an unprivileged user you could write a pidfile into /tmp easily enough, but that doesn&#8217;t solve the logging problem. I suspect the &#8220;solution&#8221; would be that if you don&#8217;t supply a writable log file as an arg to the start command (or in config.yml), logging is disabled. But really, I&#8217;m not even sure that is worth the trouble. The whole thing is really designed to be run in place. Trying to make it gem-able just sounds like a recipe for complexity, fragility and disaster. Methinks deployment strategies, like you said, will revolve around cap et al rather than rubygems.</p>
<p>Meditate on this I will, but I suspect I&#8217;ve answered my own question &#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kenneth Kalmer</title>
		<link>http://www.opensourcery.co.za/2009/05/13/safety-nets-for-your-ruby-daemons/comment-page-1/#comment-397</link>
		<dc:creator>Kenneth Kalmer</dc:creator>
		<pubDate>Mon, 25 May 2009 14:28:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.opensourcery.co.za/?p=201#comment-397</guid>
		<description>@Sho glad it&#039;s working out for you !

OK, I have to admit I haven&#039;t tried that yet, so it&#039;s virgin territory. How about slapping a  &#039;hello world&#039; daemon-kit/gem project on github with some intended use and the failures? That would give me a point to start from and figure out a clean fix to the problem.</description>
		<content:encoded><![CDATA[<p>@Sho glad it&#8217;s working out for you !</p>
<p>OK, I have to admit I haven&#8217;t tried that yet, so it&#8217;s virgin territory. How about slapping a  &#8216;hello world&#8217; daemon-kit/gem project on github with some intended use and the failures? That would give me a point to start from and figure out a clean fix to the problem.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sho</title>
		<link>http://www.opensourcery.co.za/2009/05/13/safety-nets-for-your-ruby-daemons/comment-page-1/#comment-396</link>
		<dc:creator>Sho</dc:creator>
		<pubDate>Mon, 25 May 2009 14:23:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.opensourcery.co.za/?p=201#comment-396</guid>
		<description>Turning out great thanks! But I am running into issues with logging/writing PID files when running as a gem. Have you tried that yet? Any configuration guidance as to how to make DK write logs into a common area? Or is this virgin territory : )</description>
		<content:encoded><![CDATA[<p>Turning out great thanks! But I am running into issues with logging/writing PID files when running as a gem. Have you tried that yet? Any configuration guidance as to how to make DK write logs into a common area? Or is this virgin territory : )</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kenneth Kalmer</title>
		<link>http://www.opensourcery.co.za/2009/05/13/safety-nets-for-your-ruby-daemons/comment-page-1/#comment-392</link>
		<dc:creator>Kenneth Kalmer</dc:creator>
		<pubDate>Tue, 19 May 2009 19:53:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.opensourcery.co.za/?p=201#comment-392</guid>
		<description>@Sho - Glad it turned out good for you, looking forward to any feedback</description>
		<content:encoded><![CDATA[<p>@Sho &#8211; Glad it turned out good for you, looking forward to any feedback</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sho</title>
		<link>http://www.opensourcery.co.za/2009/05/13/safety-nets-for-your-ruby-daemons/comment-page-1/#comment-391</link>
		<dc:creator>Sho</dc:creator>
		<pubDate>Tue, 19 May 2009 17:48:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.opensourcery.co.za/?p=201#comment-391</guid>
		<description>Uh, scratch that. I was doing something wrong. Sorry for the noise. Seems to work great. Thanks, awesome!</description>
		<content:encoded><![CDATA[<p>Uh, scratch that. I was doing something wrong. Sorry for the noise. Seems to work great. Thanks, awesome!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sho</title>
		<link>http://www.opensourcery.co.za/2009/05/13/safety-nets-for-your-ruby-daemons/comment-page-1/#comment-390</link>
		<dc:creator>Sho</dc:creator>
		<pubDate>Tue, 19 May 2009 16:23:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.opensourcery.co.za/?p=201#comment-390</guid>
		<description>Hm, upon setting out to start a new AMQP queue daemon I decided to try daemon-kit. I already have working code, I just need to daemonise it! So anyway I grabbed the latest and did daemon_kit testd -i amqp, then started it. Errors galore!

I don&#039;t even know where to start with some of these errors, eg:
 
E, [2009-05-20T02:15:20.967626 #73649] ERROR -- : AMQP::Buffer::Overflow (AMQP::Buffer::Overflow)

Uh-huh. Another few hundred lines follow, looks like some daemon-kit/AMQP interaction problem. Great. So .. does it work on your end? Maybe not the right approach for something I&#039;d like to start today? 

Looks great though, something like this is really needed!</description>
		<content:encoded><![CDATA[<p>Hm, upon setting out to start a new AMQP queue daemon I decided to try daemon-kit. I already have working code, I just need to daemonise it! So anyway I grabbed the latest and did daemon_kit testd -i amqp, then started it. Errors galore!</p>
<p>I don&#8217;t even know where to start with some of these errors, eg:</p>
<p>E, [2009-05-20T02:15:20.967626 #73649] ERROR &#8212; : AMQP::Buffer::Overflow (AMQP::Buffer::Overflow)</p>
<p>Uh-huh. Another few hundred lines follow, looks like some daemon-kit/AMQP interaction problem. Great. So .. does it work on your end? Maybe not the right approach for something I&#8217;d like to start today? </p>
<p>Looks great though, something like this is really needed!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kenneth Kalmer</title>
		<link>http://www.opensourcery.co.za/2009/05/13/safety-nets-for-your-ruby-daemons/comment-page-1/#comment-376</link>
		<dc:creator>Kenneth Kalmer</dc:creator>
		<pubDate>Wed, 13 May 2009 19:56:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.opensourcery.co.za/?p=201#comment-376</guid>
		<description>Hey Matt

Thanks for the kind words. I&#039;ll still improve the functionality a bit more, I could re-use the &#039;request&#039; or &#039;session&#039; features of Hoptoad to provide even more context when the errors are logged, but we&#039;ll see in due course what is required specifically by daemon processes...</description>
		<content:encoded><![CDATA[<p>Hey Matt</p>
<p>Thanks for the kind words. I&#8217;ll still improve the functionality a bit more, I could re-use the &#8216;request&#8217; or &#8217;session&#8217; features of Hoptoad to provide even more context when the errors are logged, but we&#8217;ll see in due course what is required specifically by daemon processes&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt Jankowski</title>
		<link>http://www.opensourcery.co.za/2009/05/13/safety-nets-for-your-ruby-daemons/comment-page-1/#comment-375</link>
		<dc:creator>Matt Jankowski</dc:creator>
		<pubDate>Wed, 13 May 2009 15:57:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.opensourcery.co.za/?p=201#comment-375</guid>
		<description>Hey Ken -- this is cool.

Exactly the sort of integration we had in mind for non-http-processing hoptoad error logging.</description>
		<content:encoded><![CDATA[<p>Hey Ken &#8212; this is cool.</p>
<p>Exactly the sort of integration we had in mind for non-http-processing hoptoad error logging.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
