简体   繁体   中英

Nodejs Server Websocket limit

I want to know if there is some type of limitation on the amount of open websockets a Node server can handle.

Right now I am testing a few hundred node instance client.js with the server, each opening its own websocket connection with the node server. After around ~240 clients connected, I get the error: Connect Error: Error: read ECONNRESET

Is there any way to increase or remove these limitations? I am currently testing on one machine but want will move over to Amazon EC2 when testing thousands of websocket connections.

You may need to increase the maximum amount of files you can have open.

Try running ulimit -n 1024 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM