title: Very simple Node.js client throws error ENOBUFS after many http requests
body: <p>I have the following set up: </p>
  
  <p>A node.js client makes end-to-end requests to a node.js server. After less than a minute, the client fails with error ENOBUFS. </p>
  
  <p><strong>client:</strong></p>
  
  <pre><code>(function(){ 
  
          var loadUrl=function(){
              var http=require('http');   
              var querystring=require('querystring'); 
              var options = {host:"localhost",port:1337,path:'/post',method:'POST'};
  
              var req = http.request(options, function(res){              
                  res.setEncoding('utf8');
                  var body='';
                  res.on('data', function (chunk) {
                      body+=chunk;
                  });           
                  res.on('end', function (chunk) {
                      loadUrl();   
                  });   
              }); 
              req.on('error', function(e) {
                console.log('problem with request: ' + e.message);
              });
              var post_data = querystring.stringify({id:0});
              req.write(post_data);
              req.end();
          }
          setTimeout(loadUrl,1000);   
      })()
  </code></pre>
  
  <p><strong>server:</strong></p>
  
  <pre><code>var http = require('http');
  http.createServer(function (req, res) {
        res.writeHead(200, {'Content-Type': 'text/plain'});
        res.end('Hello World\n');
  }).listen(1337, '127.0.0.1');
  </code></pre>
  
  <p>While <a href="https://stackoverflow.com/questions/10513415/enobufs-when-using-http-get">this question</a> is similar, I am posting this as a generalization of the original question (I am using post rather than get), with a test case.</p>