Reputation: 21626
I'm trying to start thin for my app but then the pid
cannot be generated:
$ thin -C /var/www/project_path/current/config/myproject.testing.yml start
Now I can't stop it because there is no 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)
This is the yml
file:
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
Now I can start the server but after some seconds
process vanish automatically; means I can't see the pid
which was generated by starting the server after some seconds.
Upvotes: 3
Views: 4234
Reputation: 26433
I had exactly the same annoying problem
I've found that if the server crashes on startup, the pid file gets created but there is no pid in the file. Try cat'ing the log file for the server ./logs/thin.3001.log and look for errors. You could also try starting the server manually via
rails s -p 3000
and see if there are any errors thrown.
Good luck
Chris
Upvotes: 1
Reputation:
lsof -wni tcp:1234
will give you the process ID
kill -9 PID
will kill the process
Upvotes: 2