Pringle, Chris (HP-PSG) wrote:
Stas,

I tried the latest version this morning, and it doesn't appear to have
made a great deal of difference. I'm not sure whether it consumes memory
as fast, however, as you said, there are leaks elsewhere. The following
code reproduces it.
[...]
I tested it with the same 650MB ISO image, and it consumes more and more
memory until the box falls over (my watchdog kills it before it gets
that far! :) ).

OK, I have played with it and I think it's not mod_perl fault. What happens is this: all the data passed through the filters must be allocated from the request memory pool, which won't be destroyed until the end of request. So obviously there will be a need to allocate memory of at least the size of the data to be passed through, which in your case would be 650M (plus more memory for handling multiple buckets, since each bucket allocates about 8k of data).


If you try to work with a smaller file (e.g. take a 5M file) you will see that the memory usage will grow by about 5-6M after the first request, but it won't grow more on the next request to the same server (use single server mode to verify that) (well it'll grow by a few kbytes, but unrelated to how much data you put through). I've justed tested that just to be sure. Can you at least confirm that?

Let's take it to the httpd-dev list and see what they have to say about it.

Lastly, why does the memory continue to be consumer after the client has
terminated the connection?

Because the server doesn't realize that the connection was aborted. You can check that with $c->aborted. It could also be a bug in Apache 2. I'd check whether it works without mod_perl, e.g. using INCLUDES or some other core filter with a big file.


__________________________________________________________________
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


-- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html



Reply via email to