We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
As node sets the backlog limit to 511 (see https://nodejs.org/api/net.html#net_server_listen_port_hostname_backlog_callback), the net.server.listen() call lets you set the backlog parameter. Unfortunately the ws module hides this functionality.
So, in lib/WebSocketServer.js you can change this
this._server.listen(options.port, options.host, callback);
to this
this._server.listen(options.port, options.host, options.backlog, callback);
and add this to the options
backlog: 511 (or whatever you want)
In my heavy load env, the backlog was full and this solved my issue.
It would be nice to fix this in the next ws version.
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
As node sets the backlog limit to 511 (see https://nodejs.org/api/net.html#net_server_listen_port_hostname_backlog_callback), the net.server.listen() call lets you set the backlog parameter. Unfortunately the ws module hides this functionality.
So, in lib/WebSocketServer.js you can change this
this._server.listen(options.port, options.host, callback);
to this
this._server.listen(options.port, options.host, options.backlog, callback);
and add this to the options
In my heavy load env, the backlog was full and this solved my issue.
It would be nice to fix this in the next ws version.
The text was updated successfully, but these errors were encountered: