简体   繁体   中英

“bundle exec thin start -C config/thin.yml” does not start thin

in attempt to deploy rails app to server I faced problem that 'thin' does't stars when I try do star it with cap production deploy:start. What is realy strange, than it hasn't any errors. After this I try do it on deplyment server

env RAILS_ENV=production bundle exec thin start -C config/thin.yml

Starting server on /home/deployer/app/current/tmp/sockets/thin.0.sock ... 
Starting server on /home/deployer/app/current/tmp/sockets/thin.1.sock ... 

ls /home/deployer/app/current/tmp/sockets/

ps -aux | grep thin
root     16769  0.0  0.1  15468   908 pts/0    S    11:34   0:00 grep --color=auto thin

thin.yml

chdir: /home/deployer/app/current
environment: production
timeout: 30
log: /home/deployer/app/current/log/thin.log
pid: /home/deployer/app/current/tmp/pids/thin.pid
socket: /home/deployer/app/current/tmp/sockets/thin.sock
max_conns: 1024
max_persistent_conns: 10
require: []
wait: 30
servers: 2
daemonize: true 

What is gone wrong?

In production.log only migrations

bundle exec thin start -C config/thin.yml &

returns

Starting server on /home/deployer/app/current/tmp/sockets/thin.0.sock ... 
Starting server on /home/deployer/app/current/tmp/sockets/thin.1.sock ... 
'bundle exec thin start -C confi…' has ended

Answer Okey, answer was log/thin.0.log there are some errors in code

You need to demonize thin for running it in production by adding & . Try this:

RAILS_ENV=production bundle exec thin start -C config/thin.yml &

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM