I'm using thin as the server for my Sinatra app. It is started thusly:
thin -C config/environment.yml -R config/config.ru start
Where environment.yml
has thin stuff and config.ru
has general stuff you'd find in a rackup file.
I would like to be able to daemonize (easy enough with thin's config file) and stop and restart this much like one does with apache/tomcat/etc.
When I try thin stop
or restart or various other things, I get:
Can't stop process, no PID found in tmp/pids/thin.pid
Indeed, there is no such file. I have tried specifying a pid file and location (ex. /tmp/thin.pid
, to be easy) in the thin configuration yml to various different places. All this does is change the location of the directory in the "no PID found in"
message, still no pid file is created.
Any ideas?
ps ax | grep thin
? – Carbolatedscreen
and, when I want to restart, simplyscreen -r
,ctrl+c
, and restart manually. I would like to do better. – Trichloromethanethin -C config/environment.yml stop
? – Carbolatedthin stop
andthin -C whatever.yml stop
is the location of the directory where it's meant to be looking for pids. With the yaml file specified, it will look in the directory specified by thepid:
option in that file. But either way, no pid file is ever written anywhere, as far as I can tell, by thin. I've tried adjusting the location, permissions, etc. No luck. – Trichloromethane--daemonize
switch too? – Carbolated