Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 383093 - www-servers/apache: refuses to stop with many active connections
Summary: www-servers/apache: refuses to stop with many active connections
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Peter Volkov (RETIRED)
Depends on:
Reported: 2011-09-15 13:44 UTC by Christian Ruppert (idl0r)
Modified: 2012-02-07 12:49 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
Description Christian Ruppert (idl0r) gentoo-dev 2011-09-15 13:44:08 UTC
See $Summary, I don't have a log snipped handy right now but:
@pva_theor | idl0r: please open bug for this. I remeber I saw this problem but I'll need to investigate this more.

Adding -R/--retry (start-stop-daemon) should help.
Currently it stops Apache but it takes some time till all childs/connections have been closed properly so start-stop-daemon times out. A few seconds later are all childs/connections closed and Apache did not restart because of the timeout.

All versions of Apache / the init script are affected.
Comment 1 Peter Volkov (RETIRED) gentoo-dev 2011-10-18 06:43:30 UTC
Thank you for report. Actually after investigation I've decided to remove s-s-d from stop(). Idea is that I'd like our init script be a bit more fool proof and thus I've added logic to check that parent exited `! test -f "${PIDFILE}"` and childs exited too `pgrep -P ${PID} apache2`. That said I've increased timeout to 15.
Comment 2 Oleg Muraviov 2012-02-07 12:44:24 UTC
I think it's incorrect test:
while ( ! test -f "${PIDFILE}" && pgrep -P ${PID} apache2 >/dev/null ) 

Probably it should be:
 while ( test -f "${PIDFILE}" && pgrep -P ${PID} apache2 >/dev/null )

Because pgrep will always false if there is no ${PIDFILE}.
So this while loop never happens in original script.

Am I right?