Apache start/restart slow

hankknight
hankknight used Ask the Experts™
on
It takes more than 5 minutes for Apache to start, stop or restart!

httpd -k restart
httpd -k stop
httpd -k start

Everything else seems to be fast enough.  How can I find out why there is a lag for httpd?

I run Apache 2.2 on CentOS 5.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Commented:
Turn on debug logging and then perform a restart of the apache service. Add LogLevel Debug to the apache config. Apache logs by default go to /var/log/httpd/
Commented:
It depends entirely on your configuration. If you have any IP addresses or hostnames configured anywhere and you have DNS lookups enabled, this could cause problems, as apache would wait for a DNS timeout while starting. As namol pointed out, the best place to start would be the debug log. It should give you an indication of where the problem lies.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial