如何在 Rails 3.1 应用程序中重新启动瘦集群中的各个服务器
我设置了一个瘦集群来启动 3 个服务器:
/etc/thin/myapp.yml
...
wait: 30
servers: 3
daemonize: true
...
,并且我使用 thin restart -C /etc/thin/myapp.yml
重新启动。但是,我想一次重新启动每台服务器,以减少停机时间。
例如,有没有办法通过 pid 编号或位置重新启动每个服务器?
I have a thin cluster set up to start 3 servers:
/etc/thin/myapp.yml
...
wait: 30
servers: 3
daemonize: true
...
and the I use thin restart -C /etc/thin/myapp.yml
to restart. However, I would like to restart each server at a time, to reduce downtime.
Is there a way to restart each server by pid
number or location for example?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
有更好的东西适合你
尝试选项:
--onebyone
您还可以将以下行添加到您的配置文件中
,之后您就可以重新启动瘦集群而无需任何停机。
There is something better for you
try option:
--onebyone
you may also add the following line to your config file
afterwards you able to restart you thin cluster without any downtime.
我知道问题已经得到解答,但我想添加
-o
选项。所以
只会启动在端口 3000 上运行的服务器。如果假设您还有另外两台服务器在 3001 和 3002 上运行,它们将保持不变。
-o
也适用于启动和停止命令。I know the question has been answered, but I'd like to add the
-o
option to the mix.So
Will only start the server running on port 3000. If let's say you have two other servers running on 3001 and 3002, they'll be left untouched.
-o
works with start and stop commands too.