title: Apache2 runs fine for a while, then stops serving content, error when restarting
body: <h3>My system</h3>
  
  <ul>
  <li>Apache2 runing on Debian 7 Wheezy</li>
  <li>It's a physical server with one IPv4 address and multiple vhosts.</li>
  <li>Webapps: Polaric, Redmine, phpMyAdmin, etc</li>
  <li>PHP-info here: <a href="http://tracking1.sfrkh.net/phpinfo/" rel="nofollow">http://tracking1.sfrkh.net/phpinfo/</a> (will be removed when problem is resolved)</li>
  </ul>
  
  <h3>Problem Description</h3>
  
  <p>When my server boots, everything works OK. Apache2 starts serving content, and my websites are working as expected.</p>
  
  <p>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.</p>
  
  <p>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.</p>
  
  <h3>Problem solving 1</h3>
  
  <p>If I reboot, everything is back to normal. The problem appears again after 'some time'.</p>
  
  <h3>Problem solving 2</h3>
  
  <p>First, when I try to start or restart apache2:</p>
  
  <pre><code># 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.
  </code></pre>
  
  <p>Then I check for listening sockets with netstat:</p>
  
  <pre><code># 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
  </code></pre>
  
  <p>Then I try to stop apache2:</p>
  
  <pre><code># apache2ctl stop
  httpd (pid 9124?) not running
  </code></pre>
  
  <p>- or -</p>
  
  <pre><code># /etc/init.d/apache2 stop
  Stopping web server: apache2.
  </code></pre>
  
  <p>Then I run the netstat command again, I got the exact same result as above. Not even the PID changed.</p>
  
  <p>When I kill the PID from netstat and start apache2 again:</p>
  
  <pre><code># kill -9 14794
  # apache2ctl start
  </code></pre>
  
  <p>..then everything is back to normal.</p>
  
  <p>Netstat after everything is back to normal:</p>
  
  <pre><code># 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
  </code></pre>
  
  <p>Netstat while the problem exist, and netstat after everything works, seem no different to me. Only the PID has changed.</p>
  
  <p>The problem appears again after 'some time'.</p>
  
  <h3>Question</h3>
  
  <p>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.</p>
  
  <p>Any ideas of what could be causing this?</p>
  
  <h3>Note</h3>
  
  <p>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 :)</p>
  
  <p>Thanks in advance for any help!</p>