Re: Why is apache running after doing apachectl -k stop

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Yep, it's up to you how you are going to implement your script. The point is you can't start the server until you confirm that all the threads/children processes have died and the port 80 (or what ever port your apache is running on) is free for the new process to bind to.


On Fri, Mar 23, 2012 at 9:45 AM, Daniel Ruggeri <DRuggeri@xxxxxxxxxxx> wrote:
On 3/22/2012 4:58 PM, Igor Cicimov wrote:
> Thats too fast not all threads can close in just miliseconds you know.
> Add "sleep 5" between stop and start and you should be fine.

The only concern with waiting for 5 seconds is that it might not be
enough if a request is still finishing up.

I often have the same problem. I implement this inside my apachectl
scripts after sending a shutdown signal:
while [ -f $PIDFILE];do echo sleep;sleep 1;done

It keeps the script spinning until httpd removes the pidfile and also
lets you know how many times it sleeps. This is particularly useful when
scripting startup/shutdowns.

--
Daniel Ruggeri


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux