Lighty+Mongrel unresponsive after so many requests

I transferred a site from Lighty+SCGI to Lighty+Mongrel, and now I’m
having problems with it becoming unresponsive. It works fine for about
10-15 minutes, but then attempts to access the site just stall forever.
Nothing is written in any of lighty’s or mongrel’s logs. Here’s my
lighty config:

$HTTP[“host”] =~ “www.xyz.com” {
proxy.balance = “fair”
proxy.server = ( “/” => (
(“host” => “127.0.0.1”, “port” => 8010),
(“host” => “127.0.0.1”, “port” => 8011),
(“host” => “127.0.0.1”, “port” => 8012),
(“host” => “127.0.0.1”, “port” => 8013),
(“host” => “127.0.0.1”, “port” => 8014),
) )
}

And I start the mongrels with:

mongrel_rails start -n 5 -d -e production -P log/mongrel-10.pid -p 8010

Any idea what the problem is? I just updated mongrel to the latest
version, but that didn’t fix the problem. It’s just this site that’s
having the problem too - others continue to work fine while this one’s
unresponsive. But this site also gets a lot more traffic, so that may
have something to do with it (but the server has plenty of free RAM and
CPU). I tried switching the proxy balance to “hash”, which worked about
the same (and became unresponsive after about 10-15 mins); and
“round-robin” didn’t work long at all before displaying 5xx errors.

Joe

Well, I switched from Mongrel to SCGI on this site about an hour ago and
it’s still running fine, so I guess the problem was Mongrel :(.

One thing I noticed on my other sites running Mongrel, which get far
less traffic, is that after a lot of requests they’d get slower and
slower - taking about 1-3 seconds to load, as opposed to instantaneous.
Restarting Mongrel restored performance.

Joe

Thanks Joe,

I’ll be taking a look at that, but if you can grab me off line so I can
chat
with you about the server. I sent you an offline e-mail with my info.

Zed A. Shaw

P.S. Just in case it’s not obvious, I wrote Mongrel (with some help).

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs