Hi Zed, Thanks for the response. We were not using anything strange in our configuration. No Nagios just a minimal release on debian sarge with the web server running mongrel and ssh. We had Mongrel behind a router that forwarded port 80 to the web server. Last night we installed mongrel based off this article (debian package instead of gem install)
<br><br><a href="http://www.jkraemer.net/articles/2006/07/07/mongrel-apache-and-rails-on-debian-sarge">http://www.jkraemer.net/articles/2006/07/07/mongrel-apache-and-rails-on-debian-sarge</a><br><br>We used Pen as our proxy with 3 mongrel processes. So far things are running MUCH better using this method and it has been up for 9 hours without receiving that error again and no mongrel processes have died. Also perhaps because of pen we are not receiving the BAD CLIENT message any longer either. I will see if its feasible to try to use the prerelease and repro it the old way so you can deal with the bug.
<br><br>Cheers,<br>Dallas<br><br><br><br><br><div><span class="gmail_quote">On 7/19/06, <b class="gmail_sendername">Zed Shaw</b> <<a href="mailto:zedshaw@zedshaw.com">zedshaw@zedshaw.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Tue, 2006-07-18 at 12:08 -0400, Dallas DeVries wrote:<br>> We tried to give Mongrel a go running our application which has<br>> moderate traffic. We got mongrel up and running easy enough but 3<br>> times in a short period(2hours) mongrel just died with the following
<br>> error when we went live to production with it. As you can see we are<br>> running mongrel-0.3.13.3.<br>><br>> /usr/lib/ruby/gems/1.8/gems/mongrel-<a href="http://0.3.13.3/lib/mongrel.rb:576:in">0.3.13.3/lib/mongrel.rb:576:in
</a><br>> `peeraddr': Transport endpoint is not connected - getpeername(2)<br>> (Errno::ENOTCONN)<br>><br><br>That don't make any sense since that entire chunk of code is wrapped in<br>a begin/rescue block. Actually several. Are you using anything strange
<br>for your configuration? A different load balancer or something<br>unreliable? Putting mongrel directly on the internet?<br><br>If you can do it, see if you can temporarily run with <a href="http://0.3.13.4">0.3.13.4
</a> from the<br>pre-release:<br><br> sudo gem install mongrel<br>--source=<a href="http://mongrel.rubyforge.org/releases/">http://mongrel.rubyforge.org/releases/</a><br><br>And then send me the stack trace it gives you. That release is more
<br>chatty about stuff but it has a bunch of fixes for edge cases. Maybe<br>you're hitting them somehow.<br><br>Oh, and you get this error at that line because Mongrel doesn't find an<br>X-Forwarded-For header so it tries to get the client's remote IP
<br>address. The client seems to have disconnected, so apparently that<br>Socket#peeraddr call throws an exception in this case. WHY it throws an<br>exception is beyond me. WHY it isn't caught is also beyond me.<br><br>
> Is this a bug or a configuration problem of some sort on our end? I<br>> did some googling on the error and did not find anything.<br>><br>> We also get a large number of not fatal messages that maybe someone
<br>> can enlighten me on. What would cause this message, and what does that<br>> client that caused this warning see?<br>><br>> Tue Jul 18 01:15:00 EDT 2006: BAD CLIENT (<a href="http://65.34.163.249">65.34.163.249
</a>): Invalid HTTP<br>> format, parsing fails<br><br>This happens because someone is using a client that's most likely not<br>written correctly. If you're running Nagios then this would be the most<br>likely source since Nagios is horribly written junk. Other things that
<br>cause this are people attacking your server (not kidding). Mongrel's<br>parser is pretty lax, but in the instances where I've found it blocked<br>someone I've also found that Mongrel really did need to block that<br>
client for mis-behavior.<br><br>I'm debating whether I should indicate what causes the error, but<br>generally it's better for you to use the time-stamp and a protocol<br>sniffer to check out the traffic. Otherwise mongrel wastes a lot of
<br>time reporting the bad http content.<br><br>--<br>Zed A. Shaw<br><a href="http://www.zedshaw.com/">http://www.zedshaw.com/</a><br><a href="http://mongrel.rubyforge.org/">http://mongrel.rubyforge.org/</a><br><a href="http://www.railsmachine.com/">
http://www.railsmachine.com/</a> -- Need Mongrel support?<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>