My system
- Apache2 runing on Debian 7 Wheezy
- It's a physical server with one IPv4 address and multiple vhosts.
- Webapps: Polaric, Redmine, phpMyAdmin, etc
- PHP-info here: http://tracking1.sfrkh.net/phpinfo/ (will be removed when problem is resolved)
Problem Description
When my server boots, everything works OK. Apache2 starts serving content, and my websites are working as expected.
After 'some time' (a few days to a couple of weeks), I can no longer access any of my websites. Apache2 stops serving content to my browser.
This is a recurring problem I've had for a few months. First time I experienced it, was a few days after installing and configuring everything.
Problem solving 1
If I reboot, everything is back to normal. The problem appears again after 'some time'.
Problem solving 2
First, when I try to start or restart apache2:
# apache2ctl start
- OR -
# /etc/init.d/apache2 start
(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.
Then I check for listening sockets with netstat:
# netstat -ltnp | grep ':80'
tcp 0 0 0.0.0.0:8081 0.0.0.0:* LISTEN 16100/jsvc.exec
tcp6 0 0 :::80 :::* LISTEN 14794/apache2
Then I try to stop apache2:
# apache2ctl stop
httpd (pid 9124?) not running
- or -
# /etc/init.d/apache2 stop
Stopping web server: apache2.
Then I run the netstat command again, I got the exact same result as above. Not even the PID changed.
When I kill the PID from netstat and start apache2 again:
# kill -9 14794
# apache2ctl start
..then everything is back to normal.
Netstat after everything is back to normal:
# netstat -ltnp | grep ':80'
tcp 0 0 0.0.0.0:8081 0.0.0.0:* LISTEN 16100/jsvc.exec
tcp6 0 0 :::80 :::* LISTEN 16434/apache2
Netstat while the problem exist, and netstat after everything works, seem no different to me. Only the PID has changed.
The problem appears again after 'some time'.
Question
I don't know where to go from here. Tried searching google, these forums, other forums, but can't find a solution that works for me. As you can see, I get the server back up and running, but the problem appears again and again.
Any ideas of what could be causing this?
Note
And I hope I've turned to the right forum. Google is my friend, and most of the useful advice on similar topics, comes from this forum :)
Thanks in advance for any help!