Apache2 can't close connections with restart

Posted by Theta on Server Fault See other posts from Server Fault or by Theta
Published on 2011-11-18T20:52:40Z Indexed on 2011/11/19 1:54 UTC
Read the original article Hit count: 898

Filed under:
|
|

I'm running a Debian webserver with Apache2 and the restart command started giving me an error.

root@srv:~# service apache2 stop
Stopping web server: apache2.
root@srv:~# service apache2 start
Starting web server: apache2(98)Address already in use: make_sock: could not bind to address [::]:80
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
Action 'start' failed.
The Apache error log may have more information.
 failed!

Occasionally it actually will restart without a problem but usually I have to killall -9 apache2 first. Someone on the Debian IRC had me check my active apache2 connections and it turns out they aren't quitting and dozens of them are staying open. How can I get these to eventually time out?

© Server Fault or respective owner

Related posts about apache2

Related posts about httpd