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.

Answers:

Answer

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

Try running ulimit -n 1024.

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.