httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Greenaway <>
Subject Re: [users@httpd] Apache 2.0.49 flushing CGI script causes huge memory consumption
Date Mon, 31 May 2004 11:00:11 GMT
> Are you using mod_cgid(implies worker MPM..)?
> I tested this with mod_cgid/worker MPM and did not have any problems.
> I am guessing it is a problem in mod_cgi related to an output filter
> that you have active.


I switched to mod_cgid, giving no change. I then tried your suggestion
of looking at my output filters, and found that mod_deflate seems to be
the culprit: Removing it makes allows the page to be served without
the server blinking.

I had a play around with various 'DeflateMemLevel',
'DeflateCompressionLevel' and 'DeflateBufferSize', but they seemed to
have little effect on the process size. (It always blew up to about

'DeflateWindowSize' was interesting, though. For a value <= 7, the
process took about 10M of memory, and served the page quickly. (This
happened quite consistently.) Once 'DeflateWindowSize' hit 8 though,
things got a little strange:

Each time the script was fetched from a browser, there seemed to be a
random chance that the process size would burst up to 450M. Other times,
it would be between 34-133M.  At a very rough guess, I would estimate
that the process went to 450M about 1 in 2 times. Here is a real list of
measurements for 'DeflateWindowSize' at 8:

34M, 56M, 133M, 450M, 460M, 42M, 70M, 100M, 450M

(Each time a single page with the memory hog script was loaded, and then
the worker process was monitored until the process size became stable.
The process was then killed, and the procedure repeated.)

As 'DeflateWindowSize' was increased slowly up to 15, the probability of
the process hitting 450M increased. At 'DeflateWindowSize' value of 15,
the process always seemed to hit at least 450M.

Given that 'DeflateWindowSize' is by default 15, I am a little worried
that this issue might hit someone else.

Any thoughts / Comments?

Thanks for your advice,


Household hint:
	If you are out of cream for your coffee, mayonnaise makes a
	dandy substitute.
GPG: B81A E16D E0E9 02CD 4538  BD8D C416 F31A 09E4 413E

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message