我将通过bundle exec pumactl -F config/puma.rb phased-restart
what works fine重新启动8名彪马工人.现在我发现越来越多的博士后错误:
PG::TRDeadlockDetected: ERROR: deadlock detected
我发现大约有50个空闲的postgres进程正在运行:
postgres: myapp myapp_production 127.0.0.1(59950) idle
postgres: myapp myapp_production 127.0.0.1(60141) idle
...
当我跑bundle exec pumactl -F config/puma.rb stop
的时候,它们就消失了.
如何更好地管理这些流程?谢谢你的帮助!
Update
我的美洲狮.rb:
environment 'production'
daemonize true
pidfile 'tmp/pids/puma.pid'
state_path 'tmp/pids/puma.state'
threads 0, 1
bind 'tcp://0.0.0.0:3010'
workers 8
quiet