Mongrel hangs

I’ve only been on the list for a few days. I like what I’ve been
reading.

I thought I’d post here to learn if anyone else has experienced a
similar
issue? I seem to be having trouble with a production launch of
Apache/Mongrel. The environment is

  • Apache2.2 with mod_proxy_balancer
  • Mongrel 1.1.3
  • Windows 2000 advanced server

This is the error I’m getting:

Fri Feb 08 … 2008: Read error: #<Errno::ECONNABORTED: An established
connection was aborted by the software in your host machine.>

c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-i386-mswin32/bin/…/lib/mongrel/http_response.rb:137:in
write' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-i386-mswin32/bin/../lib/mongrel/http_response.rb:137:inwrite’
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-i386-mswin32/bin/…/lib/mongrel/http_response.rb:95:in
send_header' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-i386-mswin32/bin/../lib/mongrel/http_response.rb:146:infinished’
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-i386-mswin32/bin/…/lib/mongrel.rb:165:in
process_client' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-i386-mswin32/bin/../lib/mongrel.rb:285:inrun’
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-i386-mswin32/bin/…/lib/mongrel.rb:285:in
initialize' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-i386-mswin32/bin/../lib/mongrel.rb:285:innew’
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-i386-mswin32/bin/…/lib/mongrel.rb:285:in
run' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-i386-mswin32/bin/../lib/mongrel.rb:268:ininitialize’
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-i386-mswin32/bin/…/lib/mongrel.rb:268:in
new' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-i386-mswin32/bin/../lib/mongrel.rb:268:inrun’
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-i386-mswin32/bin/…/lib/mongrel/configurator.rb:282:in
run' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-i386-mswin32/bin/../lib/mongrel/configurator.rb:281:ineach’
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-i386-mswin32/bin/…/lib/mongrel/configurator.rb:281:in
run' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-i386-mswin32/bin/mongrel_rails:128:inrun’
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-i386-mswin32/bin/…/lib/mongrel/command.rb:212:in
run' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-i386-mswin32 /bin/mongrel_rails:281 c:/ruby/bin/mongrel_rails:16:inload’
c:/ruby/bin/mongrel_rails:16

It seems like the issue occurs when clients cancels their http requests
either by navigating away from the page or clicking the stop button in
their
browser. This eventually causes Mongrel to hang when it’s coupled with
Apache.

I think it is only happening when Mongrel is behind Apache. I could run
another stress test to confirm but I’m fairly certain that when Mongrel
is
not behind Apache it does not hang. It still throws the same exception
“Errno::ECONNABORTED” but it is handled gracefully without hanging. When
Apache sends requests by proxy then Mongrel hangs, even if ProxyPass is
used
instead of Proxy balancer.

Also I noticed this morning that even after I end the stress test,
mongrel
keeps running processes/requests after the client has closed the
connections.

Thanks the excellent work that has produced an agile little server. Any
input is appreciated even if it’s just something stupid like explaining
whether I need to use keep-alives or not (and how).

G u i W e i n m a n n
A L P H A B E T W A R E