[Mongrel] mongrel memory usage ballooning and process stomping

Surendra Singhi singhi.surendra at gmail.com
Wed Jan 17 13:11:57 EST 2007


Hi,
  I have mongrel 0.3.14, with ruby 1.8.5, rails 1.1.6 and mongrel cluster
0.2.1, on debian sage 3.1 with apache 2.0, and fastthread 0.6.1.
I am load balancing 3 mongrel processes using the random port trick.

When I start mongrel the processes have about 60MB, but after some hour of
usage the memory ballons upto more than 180MB and the site becomes terribly
slow. Forcing me to restart mongrel cluster.

Also, it reports me 9 mongrel processes instead of three. I am not able to
understand why that's happening. Are really 9 mongrel processes started
instead of three?

Please help. Thanks.

ssinghi at galle1:~$ ps aux|grep mongrel
ssinghi  18252  6.6 20.2 198464 183200 ?     S    05:47  17:09
/usr/bin/ruby1.8 /usr/bin/mongrel_rails start -d -e production -p 8002 -a
127.0.0.1 -P log/mongrel.8002.pid -c /home/ssinghi/test.com/current
ssinghi  18257  0.0 20.2 198464 183200 ?     S    05:47   0:00
/usr/bin/ruby1.8 /usr/bin/mongrel_rails start -d -e production -p 8002 -a
127.0.0.1 -P log/mongrel.8002.pid -c /home/ssinghi/test.com/current
ssinghi  18258  0.0 20.2 198464 183200 ?     S    05:47   0:00
/usr/bin/ruby1.8 /usr/bin/mongrel_rails start -d -e production -p 8002 -a
127.0.0.1 -P log/mongrel.8002.pid -c /home/ssinghi/test.com/current
ssinghi  18276  6.6 20.3 199324 184576 ?     S    05:47  17:07
/usr/bin/ruby1.8 /usr/bin/mongrel_rails start -d -e production -p 8000 -a
127.0.0.1 -P log/mongrel.8000.pid -c /home/ssinghi/test.com/current
ssinghi  18279  6.4 20.4 200772 185528 ?     S    05:47  16:37
/usr/bin/ruby1.8 /usr/bin/mongrel_rails start -d -e production -p 8001 -a
127.0.0.1 -P log/mongrel.8001.pid -c /home/ssinghi/test.com/current
ssinghi  18283  0.0 20.3 199324 184576 ?     S    05:47   0:00
/usr/bin/ruby1.8 /usr/bin/mongrel_rails start -d -e production -p 8000 -a
127.0.0.1 -P log/mongrel.8000.pid -c /home/ssinghi/test.com/current
ssinghi  18284  0.0 20.3 199324 184576 ?     S    05:47   0:00
/usr/bin/ruby1.8 /usr/bin/mongrel_rails start -d -e production -p 8000 -a
127.0.0.1 -P log/mongrel.8000.pid -c /home/ssinghi/test.com/current
ssinghi  18285  0.0 20.4 200772 185528 ?     S    05:47   0:00
/usr/bin/ruby1.8 /usr/bin/mongrel_rails start -d -e production -p 8001 -a
127.0.0.1 -P log/mongrel.8001.pid -c /home/ssinghi/test.com/current
ssinghi  18286  0.0 20.4 200772 185528 ?     S    05:47   0:00
/usr/bin/ruby1.8 /usr/bin/mongrel_rails start -d -e production -p 8001 -a
127.0.0.1 -P log/mongrel.8001.pid -c /home/ssinghi/test.com/current
ssinghi  19556  0.0  0.0  1820  572 pts/0    R+   10:06   0:00 grep mongrel


My mongrel_cluster.yml file has

cwd: /home/ssinghi/test.com/current
port: "8000"
environment: production
address: 127.0.0.1
pid_file: log/mongrel.pid
servers: 3


-- 
Surendra Singhi
http://ssinghi.kreeti.com, http://www.kreeti.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20070117/013a243a/attachment-0001.html 


More information about the Mongrel-users mailing list