I have a Node.js net socket server running which works fine with a low number of clients connected to it. When I up the number to 200 client connections though, all of the initial connections establish and communicate correctly but when I hit Ctrl-C to close the client program only some of the disconnects are received on the server (via the Error: read ECONNRESET message).
I am listening to the events: close, timeout, disconnect, error and end I also check if the data event receives a length 0 data, but this situation is never triggered.
The error/disconnect events just appear to not trigger sometimes when there are a lot of disconnects at the same time.
The server and client receives no exceptions or errors while running; both are Node.js.
netstat -i shows that all connections are terminated on the client
lsof -i shows many connections still established on the server
(example of connection left open on the server from lsof)
node 5569 root 18u IPv4 4236971 0t0 TCP xxx.xxx.xxx.xxx:2048->xxxxxx.hsd1.ca.comcast.net:12501 (ESTABLISHED)
Has anyone else run across this?