nerdexam
LPI

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…

Essential System Services

Question

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?

Options

  • Aapachectl reload
  • Bapachectl restart
  • Capachectl -k stop; apachectl start
  • Dapachectl graceful
  • E/etc/init.d/httpd reload

How the community answered

(26 responses)
  • B
    15% (4)
  • C
    4% (1)
  • D
    77% (20)
  • E
    4% (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 for graceful, but it's platform-dependent and not guaranteed to be graceful everywhere; graceful is 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 bypasses apachectl'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

#Apache web server#graceful restart#service management#connection handling

Community Discussion

No community discussion yet for this question.

Full 102-500 Practice