I'm using mod perl 1.3.0 with apache 1.3.41 perl version 5.8.6, and the memory size seems to grow about 4k every 3rd or 4th request. The Perl script we are running is simply:
print "Content-type: text/html\n\n"; print "baby";
Yet that apache process just grows and grows when we slam it with apache benchmark. We are hitting it with:
ab -n 100000 -c 1 http://localhost/search/search.cgi &> /dev/null
and we watch as the process size grows from about 4 megabytes to 24 after about 20000 requests.
To answer the question below: We are doing this on redhat enterprise 4.7. Its been singled out as this because we hit a static file, or a straight up cgi request and the memory does not grow. When we use a PerlHandler Apache::Registry or PerlRun, or just point the PerlHandler to some code that is a handler, then they all leak.
Anyone seen anything like this, or know whats going on?
EDIT:
Thanks for the answers guys. I have used Devel::Cycle and found a leak, but the issue here is we have stripped down our code to printing the header and a statement. There is no way the print function in Perl leaks (I hope....). The memory leak section in Practical Modperl I have read, but it deals with coding issues, and again unless there is an issue with Perl's print function it is not the code.