we have a problem with a small-sized Rails application. It is
currently in productive use, and sometimes the customer reports
unavailability of the application.
Today I could watch one of these occasions live and connect to the
server while the application was down. Both mongrel servers were using
100% cpu and a wast amout of memory, they seemed to be blocked by some
large operation (probably a bug in some report generating
functionality of the application)
I don't see any chance to fix the bug soon, so my question is, how can
I set a time-limit on those mongrel servers?
The configuration:
- Linux Debian
- Apache mod_proxy
- 2 Mongrel servers
Somehow mongrel should be restarted, when one request takes more time
than 1 minute. I don't see a way to do this. Any help would be greatly
appreciated.
I don't see any chance to fix the bug soon, so my question is, how can
I set a time-limit on those mongrel servers?
I don't have the answer, so this isn't a very helpful post! Back in my
.asp days, we'd set a Server.Timeout to a given number of seconds.
This sort of thing would work for you.
On mongrel.rubyforge.org, there's some stuff about "Ability to specify
a timeout throttling setting and a max number of concurrent
connections with additional attempts at cleaning dead threads out".