最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

node.js - AWS NodeJS Websocket server "sleeping" - no error - Stack Overflow

programmeradmin0浏览0评论

I've got a NodeJS websocket running on an EC2 instance.

I'm keeping it alive with PM2.

I'm working on it via SSH using vis studio code.

The system is running well and I have about 500 clients (desktop C# clients) connecting every morning.

I've got no errors appearing from what I cna see and it is all nice and clean. It really isnt that intensely hit either.

Weirly here and theere i noticed on the client side that there is no active websocket connection and it is trying to reconnect and getting no response.

This happens about once a day or once every second day.

if I chaeck AWS the instance is active. If i ssh into my app it suddenly kicks into gear, the log shows all clients connecting and now its fine again for another 24 hours.

PM2 logs have no errors and it even says the server is online for X days...

It's like after a period of time the server just stops "listening" or goes to sleep or something even though PM2 says it hasnt crashed.

Any ideas what might be going wrong here?

发布评论

评论列表(0)

  1. 暂无评论