Rails server: Mongrel hung – single threaded

In development mode, by default, the mongrel server run in single threaded mode, i.e, processes one request at a time. This is done for a reason, rails apps are assumed to be not thread safe by default.

You will see server timeout errors if there are multiple AJAX calls into the same rails server.

You can add config.threadsafe! in development.rb or production.rb (when using production mode) to make it run in multi-threaded mode.

 

More on this topic:

http://m.onkey.org/thread-safety-for-your-rails