Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Socket closed by the server after upgraded to Node.js 8.1 #13655

Closed
unbornchikken opened this issue Jun 13, 2017 · 5 comments
Closed

Socket closed by the server after upgraded to Node.js 8.1 #13655

unbornchikken opened this issue Jun 13, 2017 · 5 comments
Labels
http Issues or PRs related to the http subsystem.

Comments

@unbornchikken
Copy link

unbornchikken commented Jun 13, 2017

  • Version: Node.js 8.1.0
  • Platform: Win, OSX
  • Subsystem:

We have a standard Node.js express application. The client uses socket connection pooling to connect to our regular http service, and it keeps opened sockets by hand for 6 seconds. It worked correctly from Node.js 0.8.x to 7.x, but got broken on Node.js 8.1. According to client logs the server closes idle sockets after a few seconds.

That ill behavior is consistent on OSX and on Windows, so it originates from Node.js 8.1 side for sure.

We haven't configured the created sockets in server 'connection' handler, so every setting should be at default.

So my question is, how can we configure http server socket timeouts in Node 8? We've tried:

this._httpServer.on('connection', function (socket) {
    socket.setTimeout(15000);
});

But it didn't help.

@mscdex mscdex added http Issues or PRs related to the http subsystem. v8.x labels Jun 13, 2017
@mscdex
Copy link
Contributor

mscdex commented Jun 13, 2017

Possibly already fixed by: d71718d

@unbornchikken
Copy link
Author

So this issue might be a duplicate of #13391. I'm gonna try the mentioned workaround and gonna close this if it gets resolved. Thanks for the quick reply!

@mscdex
Copy link
Contributor

mscdex commented Jun 13, 2017

FWIW the previously linked fix should be coming in the v8.1.1 release.

@aqrln
Copy link
Contributor

aqrln commented Jun 20, 2017

@unbornchikken can you please confirm whether this is fixed in 8.1.1?

@unbornchikken
Copy link
Author

Fixed, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
http Issues or PRs related to the http subsystem.
Projects
None yet
Development

No branches or pull requests

3 participants