httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From BAO RuiXian <ruixian....@pp.inet.fi>
Subject Re: [users@httpd] Apache 2.0.49 flushing CGI script causes huge memory consumption
Date Sun, 30 May 2004 13:41:33 GMT


David Greenaway wrote:

>Hello,
>
>The following CGI script causes the Apache worker process to consume
>huge amounts of memory (in my case, 'top' shows 526MB of virtual memory
>allocated to the process), causing the system to grind to a crawl.
>  
>
I tested your following script both with and without the flush. It seems 
no problem. The excution time is about couple of sencods. My environment 
is Win 2K pro, 125 MB memorey, Apache 2.0.47. What is the memory of your 
computer? How long does it take? "Causing the system to grind to a 
crawl' is not a much descriptive.

Best

Bao

>--- script start ---
>#!/usr/bin/perl
>
>print "Content-Type: text/plain\n\n";
>
>$| = 1; # flush output
>
>for (my $i = 0; $i < 100000; $i++) {
>        print "moo\n";
>}
>--- script end ---
>
>By turning off output flushing, the problem seems to go away.
>
>Obviously, having the output constantly flushing is not the most
>efficient way to write CGI script, but it surprises me that it would
>have such devastating effects. Is this a bug, or am I just missing
>something? Can anybody else reproduce this?
>
>I am running Linux 2.6.4, Apache/2.0.49 (official Debian/Testing
>package, version 2.0.49-1). The script is being run with 'cgi-script',
>and *not* mod_perl.
>
>Thanks,
>
>-David Greenaway
>
>
>  
>


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message