[Mongrel] problems with Mongrel + Pound

Zed A. Shaw zedshaw at zedshaw.com
Wed Feb 27 08:39:55 EST 2008

On Tue, 26 Feb 2008 03:25:46 -0500
mohammed.a at aol.in wrote:

> Hi,
> I have been using mongrel + Pound for the past 6 months on a single server deployment.
> Recently mongrel has started to behave very weirdly after we?moved app to a bunch of servers from a single server deployment.

These answers might help:

> - It crashes on every exception, throws 500 and throws 500 for ALL instances of the cluster? after one exception has occurred

For the crashes and database problems, make sure you have the mysql or
postgresql gem installed and that it's using the actual binary library
not the Rails built-in stuff.  The built-in driver for those databases
is bad and causes exceptions, lost connections, etc.

> - Connectivity to SQL seems to take a rather long time (the db is a different server on the same network, servers are connected through a gigaport switch)

Rule out your network config before you assume it's a *Rails* issue
(not a mongrel issue).  Try running a few simple scripts and test the
perf, then start from the most basic network config like half-duplex
and see what you can find.

> - Images deliveries have slowed down since we migrated from single server to multi server deployment (still using pound, not yet moved to apache / nginx)

Yeah, time to upgrade to nginx.  Nginx is actually easier to configure
than pound, makes more sense in the config, and is a hell of a lot
faster and stable.  Especially for having it serve static files.  Just
drop pound.

> - The application architecture uses lot of background processes?- built using?DRB which again are deployed physically on different dedicated machines to distribute load

Yeah, this really makes me wonder what you're doing.  I'd go and double
and triple check every line of code and watch network traffic to make
sure you aren't doing something dumb like sending huge files over DRb.
I'm guessing you've got something dumb that's overloading the Ruby

> - ?Mongrel doesn't always log the error 500 within its logs (mongrel may not be getting these requests).

Mongrel doesn't log most stuff, rails does.  Check in the
production.log file and see what's there.

> -? Other mongrel instances in the same cluster do not respond even if one mongrel has crashed or has encountered an exception.

That sounds like Pound more than anything.  Isolate the difference
between a connection to pound and one to mongrel.

> Here is some basic info of the deployment

With this much hardware you should be able to crank tons of requests
through the system.  If you have this many problems, it's entirely in
your design.  Remember, tons and tons of other people do way more with
much less.

Zed A. Shaw
- Hate: http://savingtheinternetwithhate.com/
- Good: http://www.zedshaw.com/
- Evil: http://yearofevil.com/

More information about the Mongrel-users mailing list