# Unresponsive Mongrel Windows 2003 Timeout Shutdown

**URL:** <https://www.ruby-forum.com/t/unresponsive-mongrel-windows-2003-timeout-shutdown/145791>\
**Category:** Mongrel\
**Created:** [August 13, 2008, 11:45pm UTC](https://www.ruby-forum.com/t/unresponsive-mongrel-windows-2003-timeout-shutdown/145791 "2008-08-13T23:45:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![yetanothergeek](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/8e8cbc/32.png) [@yetanothergeek](https://www.ruby-forum.com/u/yetanothergeek)\
**Post date:** [August 13, 2008, 11:45pm UTC](https://www.ruby-forum.com/t/unresponsive-mongrel-windows-2003-timeout-shutdown/145791/1 "2008-08-13T23:45:04Z")

</div>

I have a very strange issue going on that just started happening last  
week. I am running an apache/mongrel stack on a windows 2003 box  
connecting to a sql server 2005.

Apache 2.2.3  
Mongrel 1.1.5

Since last Thursday I have had 5 crashes where the mongrel service  
becomes unresponsive. If I restart the service all is fine. Nothing  
is being reported in the rails logs… But I did notice something in the  
mongrel logs.

Each time it look like I get the following log entry:

\*\* INT signal received.  
Wed Aug 13 15:01:20 -0500 2008: Reaping 103 threads for slow workers  
because of ‘shutdown’  
Thread #\<Thread:0x8553270 sleep\> is too old, killing.  
Wed Aug 13 15:01:20 -0500 2008: Error calling Dispatcher.dispatch  
#\<Mongrel::TimeoutError: Mongrel timed out this thread: shutdown\>  
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/…/lib/mongrel.rb:221:in  
`process' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/../lib/mongrel.rb:159:in`process\_client’  
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/…/lib/mongrel.rb:158:in  
`each’

I have seen this pattern repeated for each of the crashes. I have 5  
instances running and about 50 concurrent users who are banging away at  
this web application.

Any advice or thoughts would be much appreciated.

Thanks in advance

---

<div class="post-metadata">

**Author:** ![yetanothergeek](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/8e8cbc/32.png) [@yetanothergeek](https://www.ruby-forum.com/u/yetanothergeek)\
**Post date:** [August 15, 2008, 12:48am UTC](https://www.ruby-forum.com/t/unresponsive-mongrel-windows-2003-timeout-shutdown/145791/2 "2008-08-15T00:48:34Z")

</div>

On Wed, Aug 13, 2008 at 11:45 PM, Chris S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> mongrel logs.  
> `process’
> 
> Thanks in advance

Hey Chris,

I have seen this, but with mysql.

When you try to stop the mongrel\_service, mongrel is trying to stop  
all the threads that are pending, so that is what you see is being  
logged in the mongrel log.

There are several ways to end having “stalled” threads, a few of them  
involves timeouts and disconnections from the database.

You can check the docs about that here:  
[http://mongrel.rubyforge.org/wiki/FAQ#WhydoIgetMySQLlostconnectiontodatabaseerrors](http://mongrel.rubyforge.org/wiki/FAQ#WhydoIgetMySQLlostconnectiontodatabaseerrors)

The other issue can be related to code that is being doing something  
wrong in some request and just never finish those.  
This FAQ section describe what to do on a \*nix environment:

[http://mongrel.rubyforge.org/wiki/FAQ#WhydoesMongrelkeepdyingonme](http://mongrel.rubyforge.org/wiki/FAQ#WhydoesMongrelkeepdyingonme)

But since you’re not there, you can:

1. remove and reinstall the mongrel\_service adding the debugging  
option (-B or --debug)
2. Start the service
3. when you see it is staled, stop it and collect the log information  
to pinpoint which thread and which library break it…

Hope this help you, but without more information about your Rails  
version, Ruby version (and patchlevel) and some lirbaries involved I  
cannot comment further than that 😃

## Regards,

## Luis L. AREA 17

Human beings, who are almost unique in having the ability to learn from  
the experience of others, are also remarkable for their apparent  
disinclination to do so.  
Douglas Adams

---

<div class="post-metadata">

**Author:** ![yetanothergeek](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/8e8cbc/32.png) [@yetanothergeek](https://www.ruby-forum.com/u/yetanothergeek)\
**Post date:** [August 15, 2008, 4:19pm UTC](https://www.ruby-forum.com/t/unresponsive-mongrel-windows-2003-timeout-shutdown/145791/3 "2008-08-15T16:19:52Z")

</div>

Thanks Luis… I will check those links out.
