Uwe Dippel wrote: > This is the first time in years; and I wonder what might be wrong. I > am running OpenBSD 4.4, nothing specific. I have rotated the logs > daily through these years, with the script as below, and no problem > until today. The machine has an uptime of 50 days. > Still after the cron-ed logrotation this morning it didn't come up > with 'graceful'. > This is what I have gathered until now from the error-log: > > [Wed Mar 18 04:21:06 2009] [error] [client 77.37.220.140] File does > not exist: /htdocs/v2/intl/zh-CN/ > [Wed Mar 18 04:21:06 2009] [error] [client 77.37.220.140] File does > not exist: /htdocs/v2/error_404.html > [Wed Mar 18 04:21:10 2009] [error] PHP Notice: Undefined index: > HTTP_HOST in /htdocs/v2/libraries/joomla/environment/uri.php on line > 154 > [Wed Mar 18 04:21:10 2009] [error] PHP Notice: Undefined index: > HTTP_USER_AGENT in /htdocs/v2/libraries/joomla/html/html/behavior.php > on line 51 > [Wed Mar 18 04:21:10 2009] [error] PHP Notice: Undefined index: > HTTP_USER_AGENT in /htdocs/v2/templates/ja_purity/ja_templatetools.php > on line 200 > [Wed Mar 18 04:21:10 2009] [error] PHP Notice: Undefined index: > HTTP_USER_AGENT in /htdocs/v2/templates/ja_purity/ja_templatetools.php > on line 249 > [Wed Mar 18 04:22:44 2009] [warn] child process 23069 still did not > exit, sending a SIGTERM > [Wed Mar 18 04:22:44 2009] [warn] child process 11890 still did not > exit, sending a SIGTERM > [Wed Mar 18 04:22:44 2009] [warn] child process 9049 still did not > exit, sending a SIGTERM > [Wed Mar 18 04:22:44 2009] [warn] child process 17620 still did not > exit, sending a SIGTERM > [Wed Mar 18 04:22:44 2009] [warn] child process 6571 still did not > exit, sending a SIGTERM > [Wed Mar 18 04:22:52 2009] [notice] caught SIGTERM, shutting down > PHP Warning: Module 'mysql' already loaded in Unknown on line 0 > PHP Warning: Module 'mysql' already loaded in Unknown on line 0 > [Wed Mar 18 18:05:43 2009] [notice] Initializing etag from > /var/www/logs/etag-state > > apachectl stop
This normally returns before your servers are shut down. I ususally combine this with something like: while pgrep httpd >/dev/null && echo -n '.' && sleep .1; do done; echo to make sure the server is stopped before continuing. > newsyslog -f /var/www/conf/newhttpdlog.conf > apachectl graceful Why graceful instead of "start"? Graceful does a "graceful" _re_start, not a "graceful start", but certainly does not work with chrooted apache, if at all nowadays. > are the commands in the crontab. > When I run the command now, it works. It looks like a glitch. Still, > it ought not happen. All in all: I believe apache was not entirely shut down before rotating the logs and, more noticable, before trying to "gracefully" start it again. "apache graceful" did not start a new httpd process, since the http process still existed, but rather sent the USR1 signal to the running process, causing the strangeness you observed. /Alexander