httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 54118] New: Handle leak on parent httpd process when rotatelogs is used with CustomLog directive
Date Thu, 08 Nov 2012 09:37:35 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=54118

          Priority: P2
            Bug ID: 54118
          Assignee: bugs@httpd.apache.org
           Summary: Handle leak on parent httpd process when rotatelogs is
                    used with CustomLog directive
          Severity: normal
    Classification: Unclassified
          Reporter: carpentier@ipanematech.com
          Hardware: PC
            Status: NEW
           Version: 2.4.3
         Component: Core
           Product: Apache httpd-2

Created attachment 29570
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=29570&action=edit
apache conf file

With apache 2.4.3 Win32 (Apache Lounge Distribution, Apache 2.4.3 win32, IPv6
and Crypto enabled, apr-1.4.6 apr-util-1.4.1 apr-iconv-1.2.1 openssl-1.0.1c
zlib-1.2.7 pcre-8.30 libxml2-2.7.8 lua-5.1.5 expat 2.1.0).

The leak on the parent process appear when the child httpd process is recycled,
so configure mpm_winnt_module with MaxConnectionsPerChild = 100:
<IfModule mpm_winnt_module>
    ThreadsPerChild         150
    MaxConnectionsPerChild  100
</IfModule>

In httpd.conf, configure ErrorLog and CustomLog to use rotatelogs program:
ErrorLog "| bin/rotatelogs.exe logs/error.%Y-%m-%d.log 86400"
CustomLog "| bin/rotatelogs.exe logs/access.%Y-%m-%d.log 86400" common

Start apache
Using "handle" program from sysinternal, execute "handle -s -p <httpd parent
pid>"
In apache/bin directory, execute "ab.exe -n 100 http://localhost/"
Rexecute "handle -s -p <httpd parent pid>"
Compare the 2 results:
  - in the first I have: "22C: Process       rotatelogs.exe(7956)"
  - in the second I have: "22C: Process       <Non-existant Process>(7956)"

And to confirm it's due to rotatelogs used with CustomLog, comment the
"CustomLog" line in httpd.conf and retry => no handle leak on the parent httpd
process.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


Mime
View raw message