[FASTCGI] FastCGI Expert Sought
Lyle
webmaster at cosmicperl.com
Fri Jul 17 07:22:12 EDT 2009
Ross Richey wrote:
> Thanks for all the responses. Some more details:
>
> It may be that this is more of a conceptual problem than a technical
> problem.
>
> Several people have suggested that PERL is the problem. And indeed in
> a sense it is. It's really hard to keep PERL from leaking memory, so
> hard it's not worth even trying. This wouldn't be a problem if, after
> a certain number of requests, we could just nicely kill the old
> FastCGI process and respawn a new one. Instead we get processes which
> are defunct and Lighttpd will eventually run out of live FastCGI
> processes to use and then it will no longer be able to serve those
> requests.
Ok. Couple of things.
A) It's Perl not PERL.
B) It's not that hard to stop memory leaks in Perl, you just need to
weaken variables that contain circular references before they get
destroyed.
C) If it is a memory leak problem in Perl then it's due to the way the
script has been coded and would likely be happening just the same if in
another language.
There are plenty of Perl experts out there, and plenty of free tools you
can use to track down if this is indeed a memory leak.
http://letsgetdugg.com/2009/04/19/finding-circular-reference-leaks-in-perl/
For a QnD solution you could always do a simple Perl CRON script that
looks for the defunct processes and hits them with a kill -9.
Lyle
More information about the FastCGI-developers
mailing list