这是我的/config/puma.rb文件:
path = Dir.pwd + "/tmp/puma/"
threads 0,20
environment "production"
daemonize true
bind "unix://" + path + "socket/puma.sock"
pidfile path + "pid/puma.pid"
state_path path + "pid/puma.state"
这是尝试使用pumactl时的终端输出:
jinx@ubuntu:~/Documents/alpha$ pumactl -F config/puma.rb start
Puma starting in single mode...
* Version 2.6.0, codename: Pantsuit Party
* Min threads: 0, max threads: 20
* Environment: production
* Listening on unix:///home/jinx/Documents/alpha/tmp/puma/socket/puma.sock
There is already a server bound to: /home/jinx/Documents/alpha/tmp/puma/socket/puma.sock
jinx@ubuntu:~/Documents/alpha$ pumactl -F config/puma.rb status
allocator undefined for Proc
jinx@ubuntu:~/Documents/alpha$ pumactl -F config/puma.rb stats
allocator undefined for Proc
jinx@ubuntu:~/Documents/alpha$ pumactl -F config/puma.rb stop
allocator undefined for Proc
jinx@ubuntu:~/Documents/alpha$ pumactl -F config/puma.rb foo
Invalid command: foo
这个错误是什么意思?如何使用pumactl启动和停止应用程序服务器实例?
答案 0 :(得分:0)
这似乎与puma状态文件中的意外配置有关。
在我的情况下,错误的lowlevel_error_handler
配置设置:
:lowlevel_error_handler: !ruby/object:Proc {}
删除该行允许我再次连接pumactl
。我怀疑找到!ruby/object:Proc {}
或类似的行会导致您找到错误消息的原因。
目前还不清楚究竟是什么导致了这个错误 - Puma问题跟踪器说这已经解决了多个问题。