Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6568575
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T14:29:45+00:00 2026-05-25T14:29:45+00:00

I have a web application in Ruby on Rails. We use mongrel clusters started

  • 0

I have a web application in Ruby on Rails. We use mongrel clusters started on apcahe httpd to run the application. We have been facing an issue of huge memory consumption in the application. (RedHat,Ruby 1.8.7, Rails 2.3.5, RAM 8GB)

The thing is after we start the web server(start the mongrel clusters), the memory usage seems to be increasing. For example, if the free memory(RAM) when I started the web server was 6GB. After 2 days, the free memory becomes 3GB even at the time of no traffic in the site. If the web server is not restarted for a week, the memory seems to increase and use full 8GB RAM and cause issues of “no memory to allocate” for processes like pdf generation using “PrinceXML”, mail sending using sendmail (I think these are memory ). When the web server is restarted, the free memory goes back to 6GB.

Is this a case of memory leak in the Rails application? How to check the application for memory leaks? I have found a tool for checking memory leaks bleak_house but when I install it as a gem as shown in this link, it is giving No command bleak found when I run ‘bleak /tmp/bleak.5979.000.dump’ to analyze.

I am using PrinceXML to generate PDF reports and sendmail for mail sending purposes. This server has also got a instance of Jasper Server running. Anyone please help.

Here is the result of the top command at the time of memory overload.

-bash-3.2$ top

top - 10:34:10 up 14 days,  7:40,  2 users,  load average: 0.24, 0.40, 0.39
Tasks: 181 total,   1 running, 177 sleeping,   2 stopped,   1 zombie
Cpu(s):  0.0%us,  0.0%sy,  0.0%ni,100.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   8173984k total,  8011564k used,   162420k free,    10044k buffers
Swap:  2096472k total,   152624k used,  1943848k free,  2012016k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND            
  858 **nt*rsc  15   0 12748 1168  832 R 173.5  0.0   0:00.36 top               
    1 root      15   0 10356  108   76 S  0.0  0.0   0:17.10 init               
    2 root      RT  -5     0    0    0 S  0.0  0.0   0:00.10 migration/0        
    3 root      34  19     0    0    0 S  0.0  0.0   0:00.09 ksoftirqd/0        
    4 root      RT  -5     0    0    0 S  0.0  0.0   0:00.00 watchdog/0         
    5 root      RT  -5     0    0    0 S  0.0  0.0   0:00.12 migration/1        
    6 root      34  19     0    0    0 S  0.0  0.0   0:00.12 ksoftirqd/1        
    7 root      RT  -5     0    0    0 S  0.0  0.0   0:00.00 watchdog/1         
    8 root      RT  -5     0    0    0 S  0.0  0.0   0:00.70 migration/2        
    9 root      34  19     0    0    0 S  0.0  0.0   0:00.07 ksoftirqd/2        
   10 root      RT  -5     0    0    0 S  0.0  0.0   0:00.00 watchdog/2         
   11 root      RT  -5     0    0    0 S  0.0  0.0   0:00.67 migration/3        
   12 root      34  19     0    0    0 S  0.0  0.0   0:00.11 ksoftirqd/3        
   13 root      RT  -5     0    0    0 S  0.0  0.0   0:00.00 watchdog/3         
   14 root      10  -5     0    0    0 S  0.0  0.0   0:00.00 events/0           
   15 root      10  -5     0    0    0 S  0.0  0.0   0:00.00 events/1           
   16 root      10  -5     0    0    0 S  0.0  0.0   0:00.00 events/2
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T14:29:46+00:00Added an answer on May 25, 2026 at 2:29 pm

    I’d try using passenger (which automatically restarts and manages rails instances that grow too large in memory – much easier than rebooting mongrels that have strayed off sane memory constraints). Also you might have luck with ruby enterprise edition fork of 1.8.7 which backports some memory management fixes from 1.9 (like allowing the VM to shrink when it’s using less memory) – that change might have worked it’s way back to normal 1.8.7 though, although I am not sure. The claim with REE is that you can reduce memory consumption with 33% for rails applications.

    Ruby stuff generally tend to grow over time and need rebooting, with passenger it does that automatically for you. It’s worked perfectly for me so I can really recommend it.

    http://www.modrails.com/

    It also has good memory analytic functions

    http://www.modrails.com/documentation/Users%20guide%20Apache.html#_analysis_and_system_maintenance

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using Ruby on Rails to develop a web application. I have a wiki
I am writing a web based application using Ruby on Rails. In one of
At the moment I have a Ruby on Rails application which maintains my Users,
I'm currently looking at hosting solutions for my Ruby on Rails SaaS web application,
For Web Applications I use Ruby on Rails. And now it's time to see
I have a web application that should behave differently for internal users than external
I have a web application written in C# that consumes several internal web services.
I have a web application developed with ASP.net and C# that is running on
I have a web application that is becoming rather large. I want to separate
I have a web application that needs to take a file upload from the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.