102-500 · Question #157
You are a junior administrator of a high-traffic production web server. Which of the following commands would you run to restart the Apache web service without aborting existing connections?
The correct answer is D. apachectl graceful. apachectl graceful tells Apache to finish handling all in-flight requests before workers reload the configuration - connections are never dropped, making it the safe choice for production. This is the canonical "zero-downtime reload" command and the right answer for any…
Question
Options
- Aapachectl reload
- Bapachectl restart
- Capachectl -k stop; apachectl start
- Dapachectl graceful
- E/etc/init.d/httpd reload
How the community answered
(26 responses)- B15% (4)
- C4% (1)
- D77% (20)
- E4% (1)
Explanation
apachectl graceful tells Apache to finish handling all in-flight requests before workers reload the configuration - connections are never dropped, making it the safe choice for production. This is the canonical "zero-downtime reload" command and the right answer for any scenario where active users must not be interrupted.
Why the distractors fail:
- A.
apachectl reload- on many systems this is an alias or wrapper forgraceful, but it's platform-dependent and not guaranteed to be graceful everywhere;gracefulis the explicit, portable command. - B.
apachectl restart- performs a hard restart: it kills all child processes immediately, dropping every active connection. - C.
apachectl -k stop; apachectl start- two separate commands with a gap between them; the server is fully down during that window, causing downtime and dropped connections. - E.
/etc/init.d/httpd reload- system init script behavior varies by distro and may not guarantee graceful handling; it also bypassesapachectl's built-in syntax checking.
Memory tip: Think of the word graceful literally - a graceful exit means no one gets pushed out the door mid-conversation. Whenever an exam mentions "without aborting existing connections," the word graceful is almost always the answer.
Topics
Community Discussion
No community discussion yet for this question.