我已在 AWS 微实例上部署了 NodeJS 的 Bitnami AMI。启动我的 Node 应用程序后,一切正常。
一段时间没有任何事件后,连接到端口 :3000 的应用程序似乎已关闭。当刷新页面时发生这种情况时,我的浏览器会给出消息:
Network Error (tcp_error)
A communication error occurred: "Connection refused"
The Web Server may be down, too busy, or experiencing other problems preventing it from responding to requests. You may wish to try again at a later time.
AWS 控制台显示实例仍在运行,并且 Bitnami 构建仍在端口 80 上以标准消息进行响应。
最佳答案
Forever ( https://github.com/nodejitsu/forever ) 对于此类事情也是一个有用的工具,它为您提供了比 nohup 或 screen 更多的控制权。
关于node.js - NodeJs 不在 aws 中存活,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23931822/