Question

I am deploying a Rails application into production using Thin. Right after starting rails, Thin shuts down, the only ouput is 'Exiting':

$ bundle exec rails s -e production
=> Booting Thin
=> Rails 4.0.0 application starting in production on http://0.0.0.0:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
>> Thin web server (v1.5.1 codename Straight Razor)
>> Maximum connections set to 1024
>> Listening on 0.0.0.0:3000, CTRL+C to stop 
Exiting

The same configuration / setup works in development. The same configuration works for production using WEBrick:

$ bundle exec rails s -e production
=> Booting WEBrick
=> Rails 4.0.0 application starting in production on http://0.0.0.0:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
[2013-07-19 17:59:07] INFO  WEBrick 1.3.1
[2013-07-19 17:59:07] INFO  ruby 2.0.0 (2013-06-27) [x86_64-linux]
[2013-07-19 17:59:07] INFO  WEBrick::HTTPServer#start: pid=5231 port=3000

Surely it should be possible to receive some output on why it is shutting down from a web server rated for production use. However, I have not found out how.

Any ideas?

Was it helpful?

Solution

Turns out starting Thin in production mode made Rails eager load a module also using EventMachine, thus keeping the Thin code from being blocked after starting and immediately shutting down instead.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top