I use thin as a server for my Sinatra application. It starts as follows:
thin -C config/environment.yml -R config/config.ru start
Where environment.yml
has thin material and config.ru
is the general material that you will find in the rack file.
I would like to be able to daemonize (quite simply with a thin configuration file) and stop and restart it the same way as with apache / tomcat / etc.
When I try to do a thin stop
or reboot or other things, I get:
Can't stop process, no PID found in tmp/pids/thin.pid
Indeed, there is no such file. I tried to specify the pid file and location (e.g. /tmp/thin.pid
to be easy) in a thin yml configuration in different places. All this does is change the location of the directory in the "no PID found in"
message, but the pid file is not created.
Any ideas?
source share