在我的生产服务器中,我使用 ruby foreman 运行多个进程,我只希望我的应用程序继续工作,即使其中一个进程关闭,我希望我的进程继续工作,即使其中一个进程关闭,是否有任何棘手的方法重新启动进程,甚至不停止所有进程,以防其中一个进程出现故障?我的意思是在生产级别我希望解决方案足够稳定,没有 Upstart 是否可能?提前致谢
In my production server, I'm using ruby foreman to run multiple processes, I just want my application to keep working, even if one of the processes down, I want my processes to keep working even if one down , is there any tricky way to restart the process or even not to stop all the processes in case one went down ? I mean in production level I want the solution to be stable enough, is that possible without Upstart ? thanks in advance
发布评论
评论(2)
您不应该将 foreman 本身用于生产 - 它仅用作开发工具。相反,您可以将 god 与我的 foreman_god 宝石正在生产中。
或者,您可以使用 foreman 导出其他进程监控系统的配置文件,例如 upstart。
You should not be using foreman itself for production - it is only intended as a development tool. Instead, you can use something like god with my foreman_god gem in production.
Alternatively, you can use foreman to export config files for other process monitoring systems, for example upstart.
您可以使用另一个程序(例如 http://mmonit.com/monit/)监控您的 foreman 进程。但不知怎的,你会发现监视一个监视其他进程的进程有点奇怪。
You can monitor your foreman process with another program like http://mmonit.com/monit/. But somehow you'll find that monitoring a process which monitor other processes is kinda strange.