Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7938855
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T22:55:27+00:00 2026-06-03T22:55:27+00:00

I have the following set up: A node.js client makes end-to-end requests to a

  • 0

I have the following set up:

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.

client:

(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);   
    })()

server:

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');

While this question is similar, I am posting this as a generalization of the original question (I am using post rather than get), with a test case.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T22:55:28+00:00Added an answer on June 3, 2026 at 10:55 pm

    The issue appears to be a problem with the Node.js HTTP client connection pool.

    If you add the option agent:false to the options argument of the http.request() function it will disable connection pooling and have each request use the header Connection: close. This change seems to allow the client code to run indefinitely.

    var options = {agent:false, host:"localhost", port:1337, /*...*/ };
    

    Doing this will degrade the performance of the HTTP clients and you should see frequent pauses in the client process (presumably while the V8 runtime does garbage collection). But it does seem to solve your problem!

    Per @joshp’s comment, see if this issue has been addressed in a later version of Node.js or consider filing a bug report.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following node.js server set up listening to port 9001 var https
I have implemented the following set up (after being requested): slideshow of images changing,
I have a group of lines like the following: tb-set-node-recipe $vpn1 W2K3_SP2_VPN_SRV tb-set-node-os $vpn2
I'm trying to set a node value via an XPath. I have the following
I have the following set of data: ID | CREATED | USER -------------------------- 1
I'm trying to map a Dictionary containing Lists. I have the following set of
I'm using log4Net for my logging. I also have the following set... <log4net debug=true>
I have the following relationships set up: A HABTM B B belongsTo C C
I have the following code set up in my Startup IDictionary<string, string> properties =
I have the following models set up: class Contact < ActiveRecord::Base belongs_to :band belongs_to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.