freshworkstudio / gps-tracking-nodejs

Let you work with some GPS trackers that connects through tcp.
MIT License
260 stars 159 forks source link

Netstat Shows too many established connections #31

Open jAddict7 opened 4 years ago

jAddict7 commented 4 years ago

Socket not getting closed. Its getting increased as time passes. Around 200 devices are sending data to the server. But after restarting within 24-32 hours netstat -atn | wc -l shows around 60000 established connections. When connections go beyond 70K, then server getting crashed any time. Whether timeout scenario or anything helps in this scenario. Please guide.

azzahrah commented 3 years ago

you need to set timout, for read/write event, and close when no data received....