When a dyno shuts down, for example as part of a daily restart or as part of sleeping or a new release (as you have in your example) then Heroku has to shut down the processes running in the dyno.
It does this by sending a SIGTERM to the processes.
The logs you show are consistent with this behavior.
Indeed, if I run a webrick server locally, and shut it down with SIGTERM (kill -SIGTERM <pid>
), it behaves in exactly the same way.
ruby x.rb
[2014-04-24 09:34:46] INFO WEBrick 1.3.1
[2014-04-24 09:34:46] INFO ruby 2.0.0 (2013-06-27) [x86_64-darwin12.4.1]
[2014-04-24 09:34:46] INFO WEBrick::HTTPServer#start: pid=66968 port=1234
[2014-04-24 09:35:04] FATAL SignalException: SIGTERM
/Users/jonmountjoy/.rubies/2.0.0-p247/lib/ruby/2.0.0/webrick/server.rb:170:in `select'
/Users/jonmountjoy/.rubies/2.0.0-p247/lib/ruby/2.0.0/webrick/server.rb:170:in `block in start'
/Users/jonmountjoy/.rubies/2.0.0-p247/lib/ruby/2.0.0/webrick/server.rb:32:in `start'
/Users/jonmountjoy/.rubies/2.0.0-p247/lib/ruby/2.0.0/webrick/server.rb:160:in `start'
x.rb:5:in `<main>'
[2014-04-24 09:35:04] INFO going to shutdown ...
[2014-04-24 09:35:04] INFO WEBrick::HTTPServer#start done.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…