>> > Has anyone else noticed this sort of behavior from apache-2.2.21-r1: >> > >> > # /etc/init.d/apache2 restart >> > >> > * Stopping apache2 ... [ ok ] >> > * Starting apache2 ... >> > * start-stop-daemon: /usr/sbin/apache2 is already running [ ok ] >> > >> > # /etc/init.d/apache2 restart >> > >> > * apache2 not running (no pid file) >> > * Starting apache2 ... [ ok ] >> > >> > It probably happens about half the time I restart apache2. Nothing in >> > /var/log/apache2/error_log besides: >> > >> > [notice] caught SIGTERM, shutting down >> > [notice] Apache/2.2.21 (Unix) configured -- resuming normal operations >> > >> > - Grant >> >> I've seen that for years. I always assumed it was because the apache2 >> stop didn't complete before the apache2 start tried to start when I use >> /etc/init.d/apache2 restart. >> >> Instead I do an /etc/init.d/apache2 stop; ps aux | egrep apache until I >> see all the threads are gone and then a /etc/init.d/apache2 start > > +1 > > If there aren't many threads a quick restart will work fine, but if there are > many threads hanging around then you may be better off to stop, wait, then > start.
Thanks fellas, that makes perfect sense. Would it make sense for me to request a change to the initscript that waits until all threads have stopped before starting during a restart? - Grant

