如何知道带有乘客的 Rails 应用程序何时重新启动?
我在 DreamHost VPS(虚拟专用服务器)上有一个 Rails 3.0 应用程序,这意味着它与 Passenger 一起使用。 如您所知,Passenger 在空闲一段时间后会终止应用程序。 因此,我设置了一个对应用程序执行 ping 操作的调度程序。
但有时应用程序需要很长时间才能加载页面。 日志显示只花了 500 毫秒。所以我假设应用程序在那时重新启动,但我不确定。
我如何知道 Rails 应用程序何时重新启动?
谢谢。
山姆
I have a rails 3.0 application on DreamHost VPS(Virtual Private Server) which means it's with Passenger.
As you know Passenger kills the application after some idle time.
So I set a scheduler that pings to the application.
But sometimes the application takes long time to load a page.
The log shows it only took 500ms. So I assume that the application restarted at that point but I'm not sure.
How can I know when the rails application restarts?
Thanks.
Sam
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您可以配置 Passenger,那么我会将其设置为不终止所有实例:
http://www.modrails.com/documentation/Users%20guide%20Apache.html#PassengerMinInstances
If you can configure Passenger, then I would set it up to not kill off all your instances:
http://www.modrails.com/documentation/Users%20guide%20Apache.html#PassengerMinInstances