[rt-users] FastCGI vs/or FastCGId? System memory "leak"?

Tomas Olaj tomas.olaj at usit.uio.no
Fri Jan 13 07:52:43 EST 2006


Hi,

There are many nice advantages to use mod_FastCGI over mod_Perl. Our RT 
instances has gotten much faster in response time when we switched from 
mod_Perl to mod_FastCGI.

As mentioned earlier on this list we are slowly loosing system memory on our
RT application server, and at some point we need to restart Apache
(running v2.0.52) when memory and swap has been "eaten away".

Currently we're using mod_FastCGI v2.4.2 from http://www.fastcgi.com/, but 
the source code hasn't been maintained since 2003.

In httpd.conf we have configured:
FastCgiServer /site/rt-3.4.2/bin/mason_handler.fcgi -idle-timeout 300 -processes 10

(still on 3.4.2, since newer RT versions in 3.4 broke our e-mail administration 
code modifications, which our *nix users fanaticaly demands as opposed to 
RT's Mason view.)

Typically after a long run:
# ps aux | grep mason
nobody    8204  0.5  3.1 310572 122160 ?     S     2005 287:57 /site/perl-5.8.6/bin/perl /site/rt-3.4.2/bin/mason_handler.fcgi
nobody    8208  0.5  3.1 303116 120788 ?     S     2005 284:10 /site/perl-5.8.6/bin/perl /site/rt-3.4.2/bin/mason_handler.fcgi
nobody    8211  0.5  4.3 320840 169716 ?     S     2005 296:36 /site/perl-5.8.6/bin/perl /site/rt-3.4.2/bin/mason_handler.fcgi
nobody    8242  0.5  3.2 326480 124112 ?     R     2005 284:07 /site/perl-5.8.6/bin/perl /site/rt-3.4.2/bin/mason_handler.fcgi
nobody    8352  0.5  3.4 298260 133776 ?     S     2005 279:41 /site/perl-5.8.6/bin/perl /site/rt-3.4.2/bin/mason_handler.fcgi
nobody    8467  0.5  3.6 330692 139136 ?     S     2005 290:36 /site/perl-5.8.6/bin/perl /site/rt-3.4.2/bin/mason_handler.fcgi
nobody    8576  0.5  3.0 343052 116868 ?     S     2005 282:37 /site/perl-5.8.6/bin/perl /site/rt-3.4.2/bin/mason_handler.fcgi
nobody    8579  0.5  3.9 635708 153624 ?     S     2005 303:06 /site/perl-5.8.6/bin/perl /site/rt-3.4.2/bin/mason_handler.fcgi
nobody    8582  0.5  3.2 315260 124844 ?     S     2005 280:31 /site/perl-5.8.6/bin/perl /site/rt-3.4.2/bin/mason_handler.fcgi
nobody    8585  0.5  3.2 293456 126316 ?     S     2005 284:20 /site/perl-5.8.6/bin/perl /site/rt-3.4.2/bin/mason_handler.fcgi

It's expected that a running Perl process normaly do not free up memory, 
but e.g. PID 8204 does not time out at all. Is it because it's not idle at 
all, and too busy working with requests? Should we increase number of 
processes? They consume a lot of memory, and I think it just increases 
more and more.

# top says:

  13:44:27  up 204 days, 23:12,  2 users,  load average: 0.45, 0.50, 0.65
99 processes: 98 sleeping, 1 running, 0 zombie, 0 stopped
CPU states:  cpu    user    nice  system    irq  softirq  iowait    idle
            total    0.0%    0.0%    0.2%   0.0%     0.0%    0.0%   99.7%
            cpu00    0.0%    0.0%    0.0%   0.0%     0.0%    0.0%  100.0%
            cpu01    0.0%    0.0%    0.0%   0.0%     0.0%    0.0%  100.0%
            cpu02    0.0%    0.0%    0.0%   0.0%     0.0%    0.0%  100.0%
            cpu03    0.0%    0.0%    0.9%   0.0%     0.0%    0.0%   99.0%
Mem:  3857224k av, 3321624k used,  535600k free,       0k shrd,   36708k 
buff
                    2736968k actv,  338356k in_d,   15600k in_c
Swap: 4192944k av, 2149104k used, 2043840k free                 1772712k 
cached

---

Jesse mentioned at the Amsterdam class that mod_FCGId is another 
alternative (http://fastcgi.coremail.cn/) to mod_FastCGI, and I will have 
a closer look at this source. And, the source code looks newer and 
maintained. ;)

---

Nice little article reference:
http://www.groovie.org/articles/2004/12/18/fast-cgi-with-html-mason

---

 	Tomi

-- 
________________________________________________________________________
Tomas A. P. Olaj, email: tomas.olaj at usit.uio.no, web: folk.uio.no/tomaso
  University of Oslo / USIT (Center for Information Technology Services)
    System- and Application Management / Applications Management Group



More information about the rt-users mailing list