I have two Thin servers running for a Rails app. I start them up with bundle exec thin start
.
chdir: /[root]/current
environment: production
address: 0.0.0.0
port: 3001
timeout: 30
log: /[root]/log/thin.log
pid: tmp/pids/thin.pid
max_conns: 1024
max_persistent_conns: 100
require: []
wait: 30
threadpool_size: 20
servers: 2
daemonize: true
When I wait a few hours usually one of the two servers is gone (e.g., only see one with htop
or with pgrep -lf thin
). And even worse, sometimes both of them are gone after 10 hours or so which results in a 500 error via the browser. Furthermore, when I start 3 or 4 servers 2 of the 4 processes die within 1 minute on average.
I don't see error messages in my Rails production.log
nor in the thin.[port]
log files specified in the app.yml
file.
Is there a way to keep the Thin servers running?
Are you sure you can run your server with bundle exec -C app.yml start
?
Try bundle exec thin -C app.yml start