in reply to Memory Issue

I need to figure out why the memory is being held. Any answers or suggestions are appreciated!

Start with what you know leaks, then start chopping pieces out of it until the leak stops. The last thing you chopped is a likely culprit. If you notice that the leakage decreases, you might have multiple culprits.

In a "normal" script, POD directives are a great way to chop stuff out without really removing it. E.g.,

=for DEBUGGING my @big = ('foo') x 100000000; =cut
removes that line of code, as far as the compiler is concerned.

Since you're using PerlScript, you might need to comment lines out. I don't know if PerlScript can cope with POD.

Replies are listed 'Best First'.
Re: Re: Memory Issue
by atticboy1 (Initiate) on May 31, 2003 at 05:41 UTC
    Do you know if this is a common issue? Where memory is holding onto the variable contents? If so, do you have to use strict, and declare the variables as local variables? The application is fairly complex, in that it access a db, and brings in multiple arrays of info. This is the largest app I have written in perl, and have never been concerned with memory usage until now, but 22 MB for one httpd process seems a wee bit high to me.
      Do you know if this is a common issue? Where memory is holding onto the variable contents?

      You might have one or more variables that have becomes persistently global as a consequence of using ASP. Convert everything you can to a lexical variables.

      Without seeing your code, it's hard to get more specific.