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.
The current implementation has many exception handlers that deliberately exclude fatal exceptions. While testing in the cloud, I noticed that this has some real disadvantages in some cases:
The out of memory exception is typically not getting logged anywhere, so we have no infomation on what happened. This is not a good idea because sometimes a single stack trace can reveal some bug or configuration error and help us diagnose and fix the problem. If we are not logging anything, we are much less likely to be able to address the underlying issues.
The out of memory exception is NOT guaranteed to instantly terminate the process. So, we still have to terminate as cleanly as we can, otherwise the application may continue to run partially, now in a bad state, and even do real damage (e.g. write incorrect things to storage).
This PR updates the handling of fatal exceptions to: