微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

ruby-on-rails-Ruby-在tmp / pids / thin.pid中找不到PID(Thin :: PidFileNotFound)

我正在尝试为我的应用开始精简,但是无法生成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

更新:

现在我可以启动服务器了,但是几秒钟后进程自动消失了.表示几秒钟后我看不到启动服务器生成的pid.

解决方法:

lsof -wni tcp:1234

会给你进程ID

kill -9 PID

会杀死进程

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐