<div>I didn&#39;t know i could use the Logger class like that, pretty sweet.</div>
<div>&nbsp;</div>
<div>Do people know if rotating the logs via Logger is the issue or just rotating in general?</div>
<div>&nbsp;</div>
<div>.: Michael :.<br><br>&nbsp;</div>
<div><span class="gmail_quote">On 1/2/07, <b class="gmail_sendername">Michael Kovacs</b> &lt;<a href="mailto:kovacs@gmail.com">kovacs@gmail.com</a>&gt; wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Hmm... thanks for the suggestion I&#39;ll give that a look as well as<br>search the archives here.<br><br>
I do have the logger rotating daily right now:<br>config.logger = Logger.new(config.log_path, &#39;daily&#39;)<br><br>I think I&#39;ll remove that and see if this occurs again. The thing that<br>still bothers me though<br>
is that if one mongrel is broken from this shouldn&#39;t they all be? I<br>can always count on 1 of 4 mongrels<br>working so that every 3rd request is successful :-) In order to<br>monitor that I&#39;d have to hit the site twice to
<br>ensure that I&#39;m not just getting the good mongrel on the first hit.<br>Not very fresh.<br><br>-Michael<br><a href="http://javathehutt.blogspot.com">http://javathehutt.blogspot.com</a><br><br>On Jan 2, 2007, at 1:36 PM, Joey Geiger wrote:
<br><br>&gt; This may have to do with log rotation. There was a thread about<br>&gt; similar issue posted in I believe December. You might want to try<br>&gt; searching the mailing list archives.<br>&gt;<br>&gt; You&#39;re probably rotating your logs based on a specific size, which is
<br>&gt; why it&#39;s happening every couple hours, instead of nightly.<br>&gt;<br>&gt; On 1/2/07, Michael Kovacs &lt;<a href="mailto:kovacs@gmail.com">kovacs@gmail.com</a>&gt; wrote:<br>&gt;&gt; Hi all,<br>&gt;&gt;<br>&gt;&gt; I&#39;ve been having problems with the apache 
2.2-mod_proxy_balancer-<br>&gt;&gt; mongrel<br>&gt;&gt; setup.<br>&gt;&gt;<br>&gt;&gt; My setup is:<br>&gt;&gt;<br>&gt;&gt; CentOS 4.3<br>&gt;&gt; apache 2.2.3 (compiled from source) with mod_proxy_balancer<br>&gt;&gt; mysql 
4.1<br>&gt;&gt; ruby 1.8.4<br>&gt;&gt; mongrel 0.3.14 (I know I need to update but I think this problem is<br>&gt;&gt; independent of the mongrel version)<br>&gt;&gt; mongrel_cluster 0.2.0<br>&gt;&gt; rails_machine 0.1.1<br>
&gt;&gt;<br>&gt;&gt; I have apache setup as per Coda&#39;s configuration on his blog<br>&gt;&gt; posting from<br>&gt;&gt; several months back.<br>&gt;&gt; <a href="http://blog.codahale.com/2006/06/19/time-for-a-grown-up-server-">
http://blog.codahale.com/2006/06/19/time-for-a-grown-up-server-</a><br>&gt;&gt; rails-mongrel-apache-capistrano-and-you/<br>&gt;&gt;<br>&gt;&gt; I have 4 mongrels in my cluster.<br>&gt;&gt;<br>&gt;&gt; Things work fine for periods of time but after several hours of
<br>&gt;&gt; inactivity<br>&gt;&gt; (I think 8 hours or so) I experience oddness where only 1 of the 4<br>&gt;&gt; mongrels<br>&gt;&gt; is properly<br>&gt;&gt; responding. I end up getting a &quot;500 internal server error&quot; 3 out of 4
<br>&gt;&gt; requests as they round robin from mongrel to mongrel. There is<br>&gt;&gt; nothing in<br>&gt;&gt; the production<br>&gt;&gt; log file nor in the mongrel log. I&#39;ve reproduced this problem on<br>&gt;&gt; my staging
<br>&gt;&gt; box as well as my production box.<br>&gt;&gt;<br>&gt;&gt; The last time I reproduced the problem I decided to run &quot;top&quot; and<br>&gt;&gt; see what&#39;s<br>&gt;&gt; going on when I hit the server.<br>
&gt;&gt; Mongrel does receive every request but mysql is only active on the<br>&gt;&gt; 1 request<br>&gt;&gt; that works. In the other mongrels it never spikes up in CPU usage.<br>&gt;&gt;<br>&gt;&gt; Looking at the mysql process list revealed that all of the
<br>&gt;&gt; processes had<br>&gt;&gt; received the &quot;sleep&quot; command but one of the processes is still<br>&gt;&gt; working properly. I&#39;ve played with connection timeouts other than<br>&gt;&gt; to set the<br>&gt;&gt; timeout in my application&#39;s environment
<br>&gt;&gt; (ActiveRecord::Base.verification_timeout = 14400) as well as the<br>&gt;&gt; mysql<br>&gt;&gt; interactive_timeout variable but it seems that all the mongrels<br>&gt;&gt; should work<br>&gt;&gt; or they shouldn&#39;t. The fact that 1 out of 4 always works is rather
<br>&gt;&gt; puzzling<br>&gt;&gt; to me.<br>&gt;&gt;<br>&gt;&gt; Trying a &#39;killall -USR1 mongrel_rails&quot; to turn debug on simply<br>&gt;&gt; killed the 4<br>&gt;&gt; threads running mongrel. So now I&#39;m running the cluster in debug
<br>&gt;&gt; mode and am<br>&gt;&gt; going to just let it sit there for several hours until it happens<br>&gt;&gt; again and<br>&gt;&gt; hopefully get some idea of where the breakdown is happening. I<br>&gt;&gt; still think
<br>&gt;&gt; it has to be a mysql connection timeout but again, the fact that 1<br>&gt;&gt; of the 4<br>&gt;&gt; always works doesn&#39;t lend credence to the timeout theory.<br>&gt;&gt;<br>&gt;&gt; Has anyone experienced this phenomenon themselves?
<br>&gt;&gt;<br>&gt;&gt; Thanks for any tips/pointers and thanks Zed for all your hard work<br>&gt;&gt; with<br>&gt;&gt; mongrel.<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt; -Michaelhttp://javathehutt.blogspot.com<br>
&gt;&gt;<br>&gt;&gt;<br>&gt;&gt; _______________________________________________<br>&gt;&gt; Mongrel-users mailing list<br>&gt;&gt; <a href="mailto:Mongrel-users@rubyforge.org">Mongrel-users@rubyforge.org</a><br>&gt;&gt; 
<a href="http://rubyforge.org/mailman/listinfo/mongrel-users">http://rubyforge.org/mailman/listinfo/mongrel-users</a><br>&gt;&gt;<br>&gt;&gt;<br>&gt; _______________________________________________<br>&gt; Mongrel-users mailing list
<br>&gt; <a href="mailto:Mongrel-users@rubyforge.org">Mongrel-users@rubyforge.org</a><br>&gt; <a href="http://rubyforge.org/mailman/listinfo/mongrel-users">http://rubyforge.org/mailman/listinfo/mongrel-users</a><br><br>_______________________________________________
<br>Mongrel-users mailing list<br><a href="mailto:Mongrel-users@rubyforge.org">Mongrel-users@rubyforge.org</a><br><a href="http://rubyforge.org/mailman/listinfo/mongrel-users">http://rubyforge.org/mailman/listinfo/mongrel-users
</a><br></blockquote></div><br>