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

Bug#479136: apache2: Please don't use "sleep 10" for "restart", but wait until Apache has gone away (with timeout)

On Saturday 03 May 2008, Daniel Hahler wrote:
> The apache2 init script uses "sleep 10", after "stop" before
> calling "start".
> Please "just" wait until Apache has gone away.
> This has two benefits:
>  - No fixed downtime of 10 seconds (often Apache can be restarted
> much quicker)

The 10 seconds can probably be shortened. But the problem ist that 
there is no guarantee that the children have closed their listening 
sockets when the parent process dies. Just waiting until the parent 
disappears could cause an error when starting the new apache (e.g. 
when a child process is swapped out to disk).

>  - If Apache fails to stop in 10 seconds (open connections?!), it
> should get tried a bit longer (I've chosen 30 seconds for the
> timeout, but feel free to adjust it).

This is not a problem since we use graceful-stop. The processes 
serving open connections will continue until they are done.

Reply to: