We have Apache 2.4 setup with over 1000 vhosts, and multiple instances of logger in each :
CustomLog "|/usr/bin/logger -t apache-access -p local6.notice -n x.x.x.x" access_log
Restarting httpd takes 90+ seconds because it's opening thousands of connections to the rsyslog server.
Any advices on how to make it more efficient ?
Assuming all the logs go to the same server, I believe you can avoid this by having a single
CustomLog
entry in the main part of the server configuration, not in eachVirtualHost
. You can use a singleLogFormat
using%v
to have the virtual hostname in the message if you need it for further processing at the rsyslog receiver. See the discussion under File Descriptor Limits.