Project

General

Profile

Redmine eating memory, too many processes

Added by Evan Fosmark about 13 years ago

So I set up Redmine running on Lighttpd yesterday. It runs well but there is one huge problem. It seems to be taking up about 75% of my RAM (676MB max). Here are the relevant part of ps -aux.

USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
www-data  2252  0.0  0.4 150140  3300 ?        S    Aug10   0:03 ruby /usr/share/redmine/public/dispatch.fcgi
www-data  2640  0.0  0.4 150648  2956 ?        S    Aug10   0:03 ruby /usr/share/redmine/public/dispatch.fcgi
www-data  2777  0.0  4.6 150648 32368 ?        S    Aug10   0:03 ruby /usr/share/redmine/public/dispatch.fcgi
www-data  2856  0.0 10.5 150660 72964 ?        S    Aug10   0:03 ruby /usr/share/redmine/public/dispatch.fcgi
www-data  2922  0.0 10.5 150688 72944 ?        S    Aug10   0:03 ruby /usr/share/redmine/public/dispatch.fcgi
www-data  3125  0.0 10.5 150648 72948 ?        S    Aug10   0:03 ruby /usr/share/redmine/public/dispatch.fcgi
www-data  4566  0.0 10.5 150720 73052 ?        S    Aug10   0:03 ruby /usr/share/redmine/public/dispatch.fcgi
www-data  4631  0.0 10.5 150720 72772 ?        S    Aug10   0:03 ruby /usr/share/redmine/public/dispatch.fcgi
www-data  4725  0.0 10.5 150652 73044 ?        S    Aug10   0:03 ruby /usr/share/redmine/public/dispatch.fcgi
www-data  4782  0.0 11.4 156508 79600 ?        S    Aug10   0:04 ruby /usr/share/redmine/public/dispatch.fcgi

And free -m returns this:

             total       used       free     shared    buffers     cached
Mem:           676        668          8          0          2         30

Here is my Lighttpd config for Redmine:

$HTTP["url"] =~ "^/redmine/?" {
  alias.url = ("/redmine" => "/usr/share/redmine/public")
  server.document-root = "/usr/share/redmine/public/" 
  server.error-handler-404 = "/redmine/dispatch.fcgi" 
  index-file.names         = ("dispatch.fcgi")

  fastcgi.server           += (
    ".fcgi" => (
      "redmine" => (
         "min-procs"       => 1,
         "max-procs"       => 2,
         "check-local"    => "disable",
         "socket"          => "/tmp/redmine.socket",
         "bin-path"        => "/usr/share/redmine/public/dispatch.fcgi",
         "bin-environment" => (
          "RAILS_ENV"               => "production",
          "RAILS_RELATIVE_URL_ROOT" => "/redmine" 
         )
       )
     )
   )
}

Those processes seem to remain there forever. Anybody have a clue why this would be occuring? Thanks!


Replies (1)

RE: Redmine eating memory, too many processes - Added by Evan Fosmark about 13 years ago

I believe I've determined the issue. I think what happened was I had been restarting the web server and it just let those dispatch.fcgi instances sit out there. So each time more and more would build up. In order to alleviate this issue, I restarted the entire system and it all looks good now.

I suppose this is one of those cases where following the advice "Have you tried turning it off and on again?" would have saved me some time. :)

    (1-1/1)