Piyush, James,Thanks for your replies. 1. The memory keeps increasing beyond 300MB and eventually the mongrel_rails process goes away one by one. 2. I'm not doing any caching yet. 3. As you can see below, some processes use a lot of memory and evntually die.
Here's a snapshot of ps auwx root 22494 11.3 15.1 336352 316988 ? Sl 07:28 3:00 /usr/bin/ruby1.8 /usr/bin/mongrel_rails start -d -e production -a 127.0.0.1 -c /var/www/COUP root 22506 4.6 2.9 80776 61444 ? Sl 07:28 1:14 /usr/bin/ruby1.8 /usr/bin/mongrel_rails start -d -e production -a 127.0.0.1 -c /var/www/COUP root 22521 2.8 2.5 74236 54340 ? Sl 07:28 0:45 /usr/bin/ruby1.8 /usr/bin/mongrel_rails start -d -e production -a 127.0.0.1 -c /var/www/COUP root 23555 4.4 2.9 81084 61364 ? Sl 07:28 1:11 /usr/bin/ruby1.8 /usr/bin/mongrel_rails start -d -e production -a 127.0.0.1 -c /var/www/COUP root 23568 4.2 2.8 78724 59080 ? Sl 07:28 1:06 /usr/bin/ruby1.8 /usr/bin/mongrel_rails start -d -e production -a 127.0.0.1 -c /var/www/COUP root 23575 2.9 2.8 79892 60500 ? Sl 07:28 0:47 /usr/bin/ruby1.8 /usr/bin/mongrel_rails start -d -e production -a 127.0.0.1 -c /var/www/COUP root 23582 3.1 2.8 79312 59988 ? Sl 07:28 0:49 /usr/bin/ruby1.8 /usr/bin/mongrel_rails start -d -e production -a 127.0.0.1 -c /var/www/COUP root 23605 10.8 12.0 272004 252656 ? Sl 07:28 2:53 /usr/bin/ruby1.8 /usr/bin/mongrel_rails start -d -e production -a 127.0.0.1 -c /var/www/COUP I just restarted the cluster and within a few minutes two of them are already using large memories. Here's the output of top: 23605 root 25 0 385m 347m 4480 R 95 17.0 4:11.29 mongrel_rails 23568 root 15 0 78740 57m 4472 S 19 2.8 1:07.61 mongrel_rails 22506 root 15 0 80768 60m 4480 S 14 2.9 1:15.00 mongrel_rails 23582 root 18 0 79312 58m 4480 S 5 2.9 0:55.48 mongrel_rails 22494 root 15 0 328m 309m 4480 S 0 15.1 3:00.44 mongrel_rails 22521 root 15 0 74252 53m 4472 S 0 2.6 0:46.15 mongrel_rails 23555 root 15 0 81092 59m 4168 S 0 2.9 1:13.51 mongrel_rails 23575 root 16 0 79892 59m 4480 S 0 2.9 0:47.34 mongrel_rails I'll read the thread you sent . Thanks, Navneet On Wed, Jul 22, 2009 at 2:11 AM, Piyush Ranjan <piyush...@gmail.com> wrote: > 8 mongrels are way too much capacity. Do you need that many ? Mongrels > taking 300MB is not unheard of as James said. Are you using loads of > libraries or cache in memory ? Moreover counting per mongrel memory is not > so easy. If they use shared libraries the memory per process shoots up in > the "ps auwx" command but actual memory usage is not that high. > Read this > http://blog.chromium.org/2008/09/google-chrome-memory-usage-good-and-bad.html > > How much decrease in free RAM happen over the course of a day? > > Piyush > > > > > On Wed, Jul 22, 2009 at 2:08 PM, James Tucker <jftuc...@gmail.com> wrote: > >> 200-300MB is not unusual for a rails application. >> >> Is it growing past that? >> >> Maybe use 3 or 4 mongrels, rather than 8. >> >> >> On 22 Jul 2009, at 09:18, Navneet Aron wrote: >> >> Hi Folks, >>> I've a rails application in production environment.The rails app has >>> both a website as well as REST apis that are called by mobile devices. It >>> has a apache front end and 8 mongrel_rails running when I start the >>> cluster. Each of them stabalize around 60 MB initially. After that pretty >>> rapidly one or two of the mongrel_rails process's memory usage climbs upto >>> 300 MB (within 30 min). If I leave the system for 2 hours, pretty much all >>> the processes would have reached upwards of 300 MB . (Also there are times >>> when I can leave the system running pretty much the whole day and memory >>> usage will NOT go upto 300MB). >>> >>> The entire site becomes really slow and I've to restart the server. We >>> wanted to profile the app, but we couldn't find a good profiling tool for >>> Ruby 1.8.7 >>> >>> Can someone please suggest how should we go about troubleshooting this? >>> >>> Thanks, >>> Navneet >>> _______________________________________________ >>> Mongrel-users mailing list >>> Mongrel-users@rubyforge.org >>> http://rubyforge.org/mailman/listinfo/mongrel-users >>> >> >> _______________________________________________ >> Mongrel-users mailing list >> Mongrel-users@rubyforge.org >> http://rubyforge.org/mailman/listinfo/mongrel-users >> > > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > -- Deals From The Hip www.mobiQpons.com
_______________________________________________ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users