https://issues.apache.org/bugzilla/show_bug.cgi?id=57094

            Bug ID: 57094
           Summary: rotatelogs: number of instances is limited when server
                    started as a service on Windows
           Product: Apache httpd-2
           Version: 2.4.10
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: support
          Assignee: [email protected]
          Reporter: [email protected]

The number of rotatelogs instances that can be started seems significantly
restricted when a Windows Apache web server is started as a service as
compared to being started from the command-line.

In practical use, the idea was to have many VirtualHosts which each used
rotatelogs for both the error and access logs.  However, after a certain
point, the error log started having many occurances of the following error
message:
 AH00106: piped log program ''D:/Apache24_2410_64bit/bin/rotatelogs.exe' -l 
 'D:/Apache24_2410_64bit/Logs/http..304_%Y-%m-%d_%Hh%M.log' 360' failed 
 unexpectedly
Using the Process Explorer tool from SysInternals to monitor the running
processes, we could see that rotatelogs instances were constantly dying and 
restarting.

So, we did some testing to try to determine the limits.  The testing was
performed on a Windows 2008 R2 Enterprise SP1 (64-bit) system with 8GB memory. 
For testing purposes only, this was tested using multiple CustomLog statements 
within a single VirtualHost.  For example:

Listen 0.0.0.0:443
<VirtualHost *:443>
CustomLog "|'D:/Apache24_2410_64bit/bin/rotatelogs.exe' -l 'D:/
 Apache24_2410_64bit/Logs/http..101_%Y-%m-%d_%Hh%M.log' 360" common
CustomLog "|'D:/Apache24_2410_64bit/bin/rotatelogs.exe' -l 'D:/
 Apache24_2410_64bit/Logs/http..102_%Y-%m-%d_%Hh%M.log' 360" common
CustomLog "|'D:/Apache24_2410_64bit/bin/rotatelogs.exe' -l 'D:/
 Apache24_2410_64bit/Logs/http..103_%Y-%m-%d_%Hh%M.log' 360" common
.
.
</VirtualHost>

Each instance used a unique log name and the number of CustomLog statements
was increased/decreased while various config and environmental changes were
made to determine their effect.

When the Apache web server was started as a service using the default 
configuration with the only modification being the VirtualHost and CustomLog
statements as shown above, then the number of rotatelogs instances that could
be started without error was about 54.

We tried both the 32bit and 64bit versions of Apache 2.4.10 on the 64bit OS
but that seemed to make no difference.
Loading additional modules, such as all the mod_proxy* modules only decreased 
the allowed instances by one, so had very little effect.
We tried changing the service 'Log on as' value from 'Local System account'
to a specific user account (in the Administrators group), but that only
allowed about 3 more instances, so it also had little effect.
We also tried testing on a 2.2.8 level web server and it behaved the same.

The one thing we found that made a big difference  was starting the Apache web
server from the command-line.  When started from the command-line 
(ex: D:\Apache24_2410_64bit>bin\httpd ) as opposed to starting as a service
then a very large number of rotatelogs instances can be successfully started 
and used.  This was tested up to 175 instances without error.  We did not 
proceed beyond this number so it is unknown what the limit would be in this
case.

However, the desire is to start and run the Windows Apache server as a 
Windows service, and in this case, there is a significant restriction as
compared to starting from a command-line.

-- 
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]

Reply via email to