-
-
Notifications
You must be signed in to change notification settings - Fork 308
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prevent sonar timeouts bubbling into the stager
A clogged Ecto pool could cause cascading errors on startup due to a sequence of calls between the `Notifier`, `Sonar`, and `Stager`. 1. `Sonar` sends a notification in `handle_continue` on startup. 2. The notification is blocked while the `Notifier` waits for a connection from the Ecto pool. 3. `Stager` checks for the connection status on startup, which would eventually time out because the `Sonar` hadn't finished initializing. 4. The `Stager` crashes from the timeout error. This makes the folloing changes to prevent this sequence of events: 1. The `Stager` no longer gets the sonar status during startup. 2. The `Notifier` catches timeout errors from `Sonar` checks, warns about it, then returns an `:unknown` status.
- Loading branch information
Showing
3 changed files
with
14 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters