Skip to content

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

Closed
@unbornchikken

Description

@unbornchikken
  • 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    httpIssues or PRs related to the http subsystem.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions