Threaded Thin is really really slow on Ruby 1.9.2
So you’ve been using Thin’s threaded mode, and it’s been rocking the socks off your shiny config.threadsafe!‘d Rails app. Then, like me, you caught wind that The Dark Ages were over, and decided to upgrade from Ruby 1.8.7 to 1.9.2. But oh no! "What’s all this?," you ask. “Why isn’t Thin responding anymore?”
Rest assured, dear reader, that it is. It’s just taking 30+ seconds; Nginix or Apache aren’t that patient. There’s a 2 year old lighthouse ticket on this issue, and even some related patches in EventMachine. But apparently to little avail.
So until this is all sorted out, as the lighthouse conversation suggests, you’ll have to tell Thin to not use epolling. Supposedly this will slow it down, but it should still be faster than it was in Ruby 1.8.7.
From the command line
thin start --threaded --no-epoll ...
In a config file
... threaded: true no-epoll: true ...
Now Thin will be restored to its former, threaded glory. Enjoy!

November 16, 2011 at 7:26 AM
(i'm on os x, maybe that's why i don't have the --no-epoll option. i also don't have the "install" command)
November 16, 2011 at 7:19 AM
Seems like thin no longer has the --no-epoll flag? Thought you might be interested in this: https://github.com/jjb/threaded-rails-example
October 26, 2011 at 7:10 PM
I have found that the no-epoll setting in the YAML file doesn't seem to work. threaded does, but only when I include --no-epoll on the command line do I see the very major speed hit disappear.
January 18, 2012 at 7:59 PM
Rainbows and zbatery DO support concurrent multi-threading
You have to use the ThreadPool strategy: http://rainbows.rubyforge.org/Rainbows/ThreadPool.html
Use this for test it ;) https://github.com/jjb/threaded-rails-example
April 24, 2012 at 8:19 AM
Thanks for the article, but I have a question. How should the config file look like, and how should it be named?
Thanks,
Andrei
April 24, 2012 at 3:01 PM
@Andrei See here - How to use Thin Effectively