edx/cs_comments_service — pull request #75 by jimabramson (2013-12-10 17:27:36+00:00)
Title: Fail fast when database is unreachable

At present it takes around 10 minutes for the service to give up trying to connect to an unreachable database, before giving up and crashing. During this time requests will continue rolling in (and eventually timing out). This change reduces the failure time to about 10 seconds.

The mongoid update is necessary to pick up this fix: https://github.com/mongoid/mongoid/issues/2585 which caused mongoid.yml directives to be disregarded.

This PR also contains a couple other things to mitigate errors on startup/shutdown:
* heroku-/community-endorsed solution to rewrite the TERM signal to QUIT for unicorn, which is the unicorn way to shut down gracefully.
* fix some newrelic instrumentation directives that were broken, causing additional error noise in logs.

These changes were loadtested before/after, with no noteworthy change in response time, error rate, or amount of data transferred.

@gwprice @e0d