我正在尝试为我的应用开始精简,但随后无法生成pid:

$ thin -C /var/www/project_path/current/config/myproject.testing.yml start

现在我无法停止它,因为没有pid:
 $ thin -C /var/www/project_path/current/config/myproject.testing.yml stop

   /home/usr/.rvm/gems/ruby-1.9.2-p180@api/gems/thin-1.5.1/lib/thin/daemonizing.rb:131:in `send_signal': Can't stop process, no PID found in tmp/pids/thin.pid (Thin::PidFileNotFound)

这是yml文件:
pid: /home/usr/htdocs/testing/myproject/shared/pids/thin.pid
rackup: config.ru
log: /home/usr/htdocs/testing/myproject/shared/log/thin.log
timeout: 30
port: 1234
max_conns: 1024
chdir: /home/usr/htdocs/testing/myproject/current
max_persistent_conns: 128
environment: testing
address: 127.0.0.1
require: []

daemonize: true

更新:

现在我可以启动服务器了,但是经过一些seconds进程后,它自动消失了。表示几秒钟后我看不到通过启动服务器生成的pid

最佳答案

lsof -wni tcp:1234

会给你进程ID
kill -9 PID

会杀死进程

关于ruby-on-rails - Ruby-在tmp/pids/thin.pid中找不到PID(Thin::PidFileNotFound),我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/17023758/

10-11 17:53