We started hosting some very large content on our site, and the usage patterns in cacti have revealed that the HTTP sessions through our load-balancers drop off dramatically right at midnight. I'm not sure if I am expecting this to be normal behaviour. The logrotate process runs right at midnight, and issues a reload command through the service tool (CentOS 5.5):
Code:
$ cat /etc/logrotate.d/httpd
/data/websites/logs/*_log /var/log/httpd/*log {
missingok
daily
dateext
compress
rotate 7
sharedscripts
postrotate
/sbin/service httpd reload > /dev/null 2>/dev/null || true
endscript
}
Looking at the init script reveals that the reload section is suppose to trigger a HUP of the httpd process:
Code:
reload() {
echo -n $"Reloading $prog: "
if ! LANG=$HTTPD_LANG $httpd $OPTIONS -t >&/dev/null; then
RETVAL=$?
echo $"not reloading due to configuration syntax error"
failure $"not reloading $httpd due to configuration syntax error"
else
killproc -p ${pidfile} $httpd -HUP
RETVAL=$?
fi
echo
}
In which, Apache should reload it's configuration and start the new logfile without breaking current sessions. However that clearly isn't what is going on. Anyone able to offer any insight here? I'm tempted to edit the logrotate script to trigger a HUP directly by cat'ing the PID file directly.
Is this normal behavior for Apache when signaled with a HUP?