Don’t raise an exception on SIGTERM #1820
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Looking at our Rollbar quota, the large majority of the errors we get there come from, I believe, the recurring Heroku restart that happens. I see no reason to report these to Rollbar, since they are expected and, at least while using Heroku, necessary.
Luckily, looks like Puma has an option for this, so it makes sense to me to turn it on (or rather off, since we’re setting it to
false
). Found it while doing some research on this subject, since I’ve had a feeling I’ve seen it before.I tested this locally by terminating the
rails s
process without that option set and with that option set, here were the results (you seeSIGTERM
mention on the first one and no mention on the second try):