Hi folks,
I have a production setup that isn’t live yet (<500 visitors per day)
but the mongrels are already misbehaving.
monit has been configured to restart mongrels that are consuming more
than 170MB. What I observe is that the mongrels quickly hit this
limit, typically within 10-20 minutes of starting up. I relaxed the
memory cap for one mongrel and set it to 500MB but the result is still
the same - it still hits the monit memory limit almost as fast as the
other mongrels.
log rotation is in place and the logs are being truncated when they
hit more than 10MB.
gettext is being used heavily in almost all pages.
page caching and page fragment caching is used almost everywhere it
can be used.
On my local development machine, I find that I can easily hit 200MB
with less than 50 clicks. I typically keep my mongrel running all the
time during development. As of today my dev mongrel has been up since
yesterday and I just found out that it is now at 800MB, with just me
poking at it over the last 36 hours or so.
I (well, me and my teammates) are looking at the following steps to
see what’s going on:
- run bleak_house to see where the leaks are coming from
- run on JRuby and see if we’ll get the same memory leak patterns. If
we do then definitely it’s our code that’s suspect here. If we don’t
then maybe it’s with one of the gems or libraries we’re using.
I am also hoping that these too will help:
3. install the latest ruby 1.8.6 from source (patch level 114?)
4. install the latest postgres gem (0.7.9?)
I’d very much appreciate any pointers on other possible actions to
take.
Thanks!
rad
Here are more details on the production server:
Dual Intel Xeon 2GHz
4GB RAM
64-bit CentOS 5.1
ruby 1.8.6 (2007-03-13 patchlevel 0) [x86_64-linux]
rubygems 1.1.1
gems:
actionmailer (2.0.2, 1.3.6, 1.3.3)
actionpack (2.0.2, 1.13.6, 1.13.3)
actionwebservice (1.2.6, 1.2.3)
activerecord (2.0.2, 1.15.6, 1.15.3)
activeresource (2.0.2)
activesupport (2.0.2, 1.4.4, 1.4.2)
ar_mailer (1.3.1)
ar_mailer_generator (1.0.0)
bleak_house (4.0)
BlueCloth (1.0.0)
capistrano (2.2.0)
cgi_multipart_eof_fix (2.5.0)
columnize (0.1)
daemons (1.0.10)
eventmachine (0.10.0)
fastthread (1.0.1)
gem_plugin (0.2.3)
gettext (1.10.0)
highline (1.4.0)
hoe (1.5.1)
hpricot (0.6)
htmlentities (4.0.0)
linecache (0.42)
mocha (0.5.6)
mongrel (1.1.4)
mongrel_cluster (1.0.5)
needle (1.3.0)
net-sftp (1.1.1)
net-ssh (1.1.2)
production_log_analyzer (1.5.0)
rails (2.0.2, 1.2.6, 1.2.3)
rails_analyzer_tools (1.4.0)
railsmachine (1.0.0)
rake (0.8.1)
RedCloth (3.0.4)
rmagick (2.3.0)
ruby-debug (0.10.1)
ruby-debug-base (0.10.1)
ruby-postgres (0.7.1.2006.04.06)
ruby-prof (0.6.0)
rubyforge (0.4.5)
RubyInline (3.6.7)
rubypants (0.2.0)
swiftiply (0.6.1.1)
SyslogLogger (1.4.0)
ZenTest (3.9.2)