https://issues.apache.org/bugzilla/show_bug.cgi?id=49713
Summary: Reverse proxy with MaxKeepAliveRequests=0 consumes
memory without bound
Product: Apache httpd-2
Version: 2.2.15
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: mod_proxy
AssignedTo: [email protected]
ReportedBy: [email protected]
Created an attachment (id=25853)
--> (https://issues.apache.org/bugzilla/attachment.cgi?id=25853)
Perl script that functions as a simple backend
Overview: Running Apache 2.2.16 on RHEL 5.5 as a reverse proxy. When
KeepAlives is on, MaxKeepAliveRequests are 0 and MaxRequestsPerChild is 0, the
memory footprint of the httpd client processes grow without bound.
Steps to Reproduce:
1. Create a simple backend server that just kicks back a 200 OK for all
requests.
2. Change httpd.conf to have:
KeepAlive On
MaxKeepAliveRequests 0
<IfModule prefork.c>
StartServers 1
MinSpareServers 1
MaxSpareServers 1
MaxClients 1
MaxRequestsPerChild 0
</IfModule>
<IfModule mod_proxy.c>
ProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPass /foo http://<ip of backend server>
Start up the server.
3. Flood the proxy server with requests. I did this with
while :; do; wget -i urls.txt -q -O /dev/null; done
Where urls.txt was 1000000 lines of http://localhost/foo. Run this loop on the
proxy server.
Actual Results:
Top will show that the vsize and RSS for the 1 httpd process will grow without
bound until the machine runs out of memory.
Expected Results:
I would expect the memory footprint to remain consistent.
Build Date & Platform:
Apache 2.2.16 on RHEL 5.5.
Additional Builds and Platforms:
Also seen on Apache 2.2.3 on RHEL 4.8.
Additional Information:
A core dump of the httpd process during the run shows that the memory is being
taken up by the repetitive storage of the URI of the backend server over and
over. After 15 minutes of running, I noted 700,000 strings equal to the ip
address and 2.1 million after 30 minutes. I will attach the core dump
gathered. For the backend server, I used the attached perl script to function
as a very simple server.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]