Skip to content


Switch branches/tags

Latest commit

On Ubuntu Impish (development version), we're currently facing a
problem where thin's testsuite fails when it runs on an armhf system.
After some investigation, I noticed that the reason for this failure
was that the server was still running even after the loop on

Given that the loop is actively checking to see if the server has
stopped, I'd like to propose that the timeout be increased from 1
second to 10 seconds.  Although I'm not a fan of the
"let's-just-increase-the-timeout" type of solutions, in this
particular case I think it's justified and makes sense (1 second may
indeed be too quick for the server to properly stop).

Signed-off-by: Sergio Durigan Junior <>

Git stats


Failed to load latest commit information.


A small and fast Ruby web server


gem install thin

Or add thin to your Gemfile:

gem 'thin'


A +thin+ script offers an easy way to start your Rack application:

thin start

Browse the example directory for sample applications.

Usage with Rails Action Cable

To use Thin with Action Cable, add the following to your Gemfile:

gem 'faye-websocket'
gem 'thin' # If not already done

Create a config/initializers/thin_action_cable.rb:

Rails.application.config.action_cable.use_faye = true
Faye::WebSocket.load_adapter 'thin'


Use a rackup ( file and bind to localhost port 8080:

thin -R -a -p 8080 start

Store the server process ID, log to a file and daemonize:

thin -p 9292 -P tmp/pids/ -l logs/thin.log -d start

Thin is quite flexible in that many options can be specified at the command line (see thin -h for more).

Configuration files

You can create a configuration file using thin config -C config/thin.yml.

You can then use it with all commands, such as: thin start -C config/thin.yml.

Here is an example config file:

user: www-data
group: www-data
pid: tmp/pids/
timeout: 30
wait: 30
log: log/thin.log
max_conns: 1024
require: []
environment: production
max_persistent_conns: 512
servers: 1
threaded: true
no-epoll: true
daemonize: true
socket: tmp/sockets/thin.sock
chdir: /path/to/your/apps/root
tag: a-name-to-show-up-in-ps aux


Ruby License,


The parser was originally from Mongrel by Zed Shaw. Mongrel is copyright 2007 Zed A. Shaw and contributors. It is licensed under the Ruby license and the GPL2.

Thin is copyright Marc-Andre Cournoyer

Get help at Report bugs at and major security issues directly to me at