Charles wrote:
Well, why it's possible. I doubt it does. Most likely your code causes the leakage.A Linux machine running Apache/2.0.35 (Unix) mod_perl/1.99_05-dev Perl/v5.6.1 mysql 4.0.1 uses increasing "used" memory (according "/usr/bin/free"), eventually resuting in all memory being consumed. Memory usage drops somewhat after a reboot of apache and mysql, but not completely.
First of all, if you don't report the complete details about your build we can't even start helping to you. Use the proper procedure of reporting problem as described here:
http://perl.apache.org/docs/2.0/user/help/help.html#Reporting_Problems
(linked from the shortcuts menu on the left of perl.apache.org so it's *easy* to find)
Second, do you see the same behavior under mod_perl 1.0?
First of all you should try and isolate the problem, so your test case is simple. Debugging a huge program can be a problem. The mod_perl guide discusses several ways to debug problems, though not all tools are available to 2.0 yet, so you better off debugging this with mod_perl 1.0 if possible. For example see:If a reference does not go out of scope between sessions, that memory will not be garbage collected. I would like to test for these types of difficulties.
http://perl.apache.org/docs/1.0/guide/debug.html#How_can_I_find_out_if_a_mod_perl_code_has_a_memory_leak
Apache::VMonitor for mod_perl 1.0 should be of a good help. I've several obstacles that I'm trying to resolve at the httpd land and then I'll make it available for 2.0.Questions:Are there tools to track total (all threads/processes) mod_perl, apache, mysql memory usage?
it's also possible that the way your wrote the code brings huge chunks of data from db into the memory and never frees them. (e.g. a closure problem http://perl.apache.org/docs/general/perl_reference/perl_reference.html).What is the normal behavior for a module which connects (via a global) to a database in terms of mysql processes started?
in summary, narrow down the test case if possible, hopefully without involving any rdbms code, send the complete details of your setup and we will see what can be done.
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com