title: EADDRNOTAVAIL after many http.get requests to localhost
body: <p>When doing many http.get-requests to localhost (Apache) after 28233 requests I get <code>EADDRNOTAVAIL</code>. </p>
  
  <p>When broken:</p>
  
  <ul>
  <li>I <strong>cannot do</strong> a http.request to localhost for (round about) 10 seconds (<code>EADDRNOTAVAIL</code>)</li>
  </ul>
  
  <p>While <em>these 10 seconds</em></p>
  
  <ul>
  <li>I <strong>can do</strong> <code>curl http://localhost</code>  (there is no error in Apache, it is still working like charm)</li>
  <li>I <strong>can do</strong>  a http.get-request (from node.js) to <code>www.google.com</code> (the error only affects requests to localhost)</li>
  </ul>
  
  <p>After 10 seconds </p>
  
  <ul>
  <li>I <strong>can do</strong> a http.request to localhost again (as if node.js has healed itself)</li>
  </ul>
  
  <p>This is the code:</p>
  
  <pre><code>var http = require( "http");
  
  function httpRequest( callback ) {
      var options = {
              host: 'localhost',
              port: 80,
              path: ''
          },
          data = "";
  
      http.get(options, function(resp){
          resp.on('data', function( chunk ){   
              data += chunk;
          }).on("end", function() {
              callback( null, data );
          });
      }).on("error", function(e){
              callback( e );
      });
  }
  
  function loop( i, callback ) {
      if( i &lt; 100000 ) {
          httpRequest( function( err, data ) {
              if( err ) {
                  console.log( "Error!", i, err );
                  return;
              }
              if( i % 1000 === 0 ) {
                  console.log( i );
              }
              loop( i+1, callback );
          });
      } else {
          callback();
      }
  }
  
  console.log( "GO!");
  loop( 0, function() {
     console.log( "READY!");
  });
  </code></pre>