node-http-proxy icon indicating copy to clipboard operation
node-http-proxy copied to clipboard

Error ENOBUFS

Open hershkoy opened this issue 3 years ago • 1 comments
trafficstars

My application calls the proxy once every few seconds (about 1call/3sec). After a few successful responses, a few occasional errors appear:

error {"errno":-4060,"code":"ENOBUFS","syscall":"connect","address":"127.0.0.1","port":80}

Then after few more connections, every new request is responded with the above error.

I tried the solution of adding agent: false described here, but it didn't help:

var option = {
  target: 'http://localhost',
  selfHandleResponse : true,
  agent: false
};

var server = http.createServer(function(req, res) {
  proxy.web(req, res, option);
});

The ENOBUFS issue happens even when I reduced the requests rate to 6 seconds.

hershkoy avatar Aug 21 '22 11:08 hershkoy

Also running into this issue with { "selfHandleResponse": true }.

brianjenkins94 avatar Feb 22 '24 21:02 brianjenkins94