[Mongrel] cluster with environment variables

Luis Lavena luislavena at gmail.com
Mon Mar 5 17:41:28 EST 2007

On 3/5/07, Jason Yates <jaywhy at gmail.com> wrote:
> I should have responded earlier to myself.  Just in case others have
> similar problems in the future.
> The problem wasn't mongrel at all.  However, the issue seemed to be
> coming from mongrel, because for whatever reason an error from Rjb
> wasn't getting logged
> The problem was Java was eating up all the available memory.  Because
> each mongrel instance would start its own Java process. The first one
> would steal all the available memory. Then the second couldn't even
> start because no memory was available.  Hence one mongrel instance
> would work the other wouldn't

You should have used BackgrounDrb and some queue/method to communicate
with your mongrel_cluster instead, that way, only one java process
will be running.

> The JRE does this because it checks for available system memory and
> allocates a portion of it.  Which is fine, however in my case I'm
> using a virtual server.  So I only had a 256mb portion of the 4gbs
> Java thought it had to play with.
> Anyways I blogged about it.  If anyone cares.
> http://jaywhy.wordpress.com/2007/03/05/pdf-templates-via-rails/

Still long-running process or process that eat a lot of resources from
your web application is wise, injecting them into the whole web
serving experience is a pain to debug.

Good to knwo you solved this.

Luis Lavena
Multimedia systems
Leaders are made, they are not born. They are made by hard effort,
which is the price which all of us must pay to achieve any goal that
is worthwhile.
Vince Lombardi

More information about the Mongrel-users mailing list