[Mongrel] Multi apps in one Mongrel instance

Zed Shaw zedshaw at zedshaw.com
Fri Aug 25 19:14:38 EDT 2006

On Fri, 2006-08-25 at 10:22 -0600, Kirk Haines wrote:
> On 8/25/06, Jarkko Laine <jarkko at jlaine.net> wrote:
> > No offense, Jean-Eric, but you already asked this two weeks ago [1]
> > and got 7 responses, including one from Zed himself [2].
> >
> > The answer: You can't do that as long as Rails is not thread-safe, in
> > other words not any time soon.

> Change Mongrel and the Rails handler so that one has the option of
> forking instead of spawning a new thread to handle the request.  It
> might be a usably fast way to get multiple Rails requests out of a
> single Mongrel.  On my test server (a pretty modest AMD based box
> running a 2.4 Linux kernel), I can fork a little over 200 7Mb
> processes a second in a simple test.

The problem with that Kirk is a large majority of people use VPS for
their deployment, and the OS accounts for these forked processes as if
they're using up the shared ram.  In Linux this bring the wrath of their
dumb killer process and it kills them off.

Now, what *I* want to investigate is getting a framework (any one)
working on Ruby 1.9 and look at just creating a bunch of YARV VMs which
are all handling each request sequentially.

Zed A. Shaw
http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help.

More information about the Mongrel-users mailing list