Home Rails 重启puma的命令 热启动
Post
Cancel

Rails 重启puma的命令 热启动

常规办法:

$ bundle exec pumactl phased-restart -C config/puma.rb

下面是两个不常规的办法:

1. 简单粗暴的 kill -9 

2. bundle exec pumactl -P tmp/pids/puma.pid restart

3. 高端麻烦: 保持原有的进程不变,启动新端口的进程,

进程启动后,然后配置nginx使用新端口,放弃老端口。重启nginx . 

就可以了。 (也就是说你有两组端口使用。 本次部署1-5, 下次部署6-10 ) 

This post is licensed under CC BY 4.0 by the author.