如何自动重启节点服务器? [英] how to automatically restart a node server?

查看:62
本文介绍了如何自动重启节点服务器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在完成一个项目的开发,客户端已经在使用它,但偶尔会出现一些错误 - 服务器崩溃.

We are finishing development of a project, the client is already using it but occasionally some errors occur - crashing the server.

我知道我可以在 linux 上将服务注册为新贵"脚本,以便在我的节点服务崩溃时重新启动.

I know I could register a service as 'upstart' script on linux, in order to have my node service restart when it crashes.

但是我们的服务器正在运行其他东西,所以我们无法重新启动它.嗯,实际上,在写作时,我意识到我有两个问题:

But our server is running other stuff, so we can't restart it. Well, actually, while writing, I realize I have two questions then:

  • 新贵"无需重启就能工作吗?有些东西对我耳语是:)
  • 如果没有,当我的节点服务器崩溃时,我还有什么其他选择可以重生"它?

推荐答案

是的,upstart 将重新启动您的进程,而无需重新启动.

Yes, upstart will restart your process without a reboot.

此外,您应该查看 forever.

这篇关于如何自动重启节点服务器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆