Bug 32750 - mod_proxy + Win32DisableAcceptEx = memory leak
Summary: mod_proxy + Win32DisableAcceptEx = memory leak
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: mpm_winnt (show other bugs)
Version: 2.0.49
Hardware: PC Windows Server 2003
: P2 major (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
: 42894 (view as bug list)
Depends on:
Reported: 2004-12-17 14:35 UTC by Charlie Cox
Modified: 2007-12-30 23:23 UTC (History)
1 user (show)


Note You need to log in before you can comment on or make changes to this bug.
Description Charlie Cox 2004-12-17 14:35:40 UTC
Apache 2.0.49, Win2003
modules: mod_proxy, mod_jk2, mod_rewrite, mod_ssl

I enabled Win32DisableAcceptEx to clean up some errors in the logs and since
then, my apache process has gone from its happy 40-60MB usage to 220MB in 3
days. I restarted Apache and it is gaining about 20MB/hour and after one day was
up to 140MB.

I removed the Win32DisableAcceptEx and it is back to its usual 40MB.

Some testing shows that mod_proxy requests cause memory to increase while static
and jk2 requests do not. These requests were not SSL nor did they require

Proxy config:

    ProxyRequests Off
    RewriteEngine on
	ProxyPass / http://server:8080/
	ProxyPassReverse / http://server:8080/
    RewriteCond %{HTTP:Authorization} ^(.*)
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%1]
    ProxyPreserveHost On

Comment 1 Paul Querna 2004-12-30 08:05:53 UTC
Can a windows guru explain how disabling the AcceptEx on Win32 could cause
memory leakage in mod_proxy?  Aren't these two complete unreleated?
Comment 2 Vincent Lepot 2006-07-05 08:25:27 UTC
See Bug 34664 : the memory leak seems to come from the use of
Win32DisableAcceptEx itself.

The probable reason is that, when using this directive, other functions are
called in Apache code (such as win9x_get_connection and win9x_accept), and the
leaks can be in one of these functions. I don't think it comes from Windows
primitive "accept" itself...
Comment 3 Davi Arnaut 2007-08-04 12:42:45 UTC
*** Bug 42894 has been marked as a duplicate of this bug. ***