You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2002/06/08 00:17:56 UTC
DO NOT REPLY [Bug 9708] New: -
POST with keep-alive increases process size
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9708>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9708
POST with keep-alive increases process size
Summary: POST with keep-alive increases process size
Product: Apache httpd-2.0
Version: 2.0.36
Platform: PC
OS/Version: Linux
Status: NEW
Severity: Normal
Priority: Other
Component: Core
AssignedTo: bugs@httpd.apache.org
ReportedBy: apxs@fx.org
When sending many large (1MB+) POST requests over a keep-alive connection, the
http process grows in size after each request. For example, after 1000 such
requests, the process size may grow by 4MB. Without keep-alive, the processes do
not grow. This occurs with CGI scripts and custom C modules in Apache 2.0.36.
However, the memory is apparently not leaked -- running the same 1000 requests
again does not cause the size to grow.
The following CGI script (post.cgi) can be used to accept the POST data:
#!/usr/bin/perl -w
use strict;
my $len = 0;
while(<STDIN>) {
$len += length($_);
}
my $msg = "Received $len bytes\n";
printf "Content-Type: text/plain\nContent-Length: %d\n\n%s",
length($msg), $msg;
exit;
Next, create a large file:
$ dd if=/dev/zero of=big bs=1024 count=1024
Then send many keep-alive requests to the server. This example uses 'curl':
$ curl -T big `perl -e 'print "http://localhost:8080/post.cgi " for (0..999)'`
Observe the large (7MB) process size:
$ ps -aux | grep lt-http
web 10917 0.0 0.0 3200 1576 ? S 07:53 0:00 lt-httpd
web 10918 0.8 0.0 3672 2072 ? S 07:53 0:01 lt-httpd
web 10919 4.4 0.1 7620 6016 ? S 07:53 0:06 lt-httpd
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org