-
Notifications
You must be signed in to change notification settings - Fork 543
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reduce thrown exceptions #7527
base: main
Are you sure you want to change the base?
Reduce thrown exceptions #7527
Conversation
backport this plz |
The code in the 9.1 branch already doesn't throw errors, it just does it in a different way. (not throwing the app host exception isn't in 9.1, but it is one message when restarting a resource so is low impact compared to the TimeoutException every few seconds) What is the reason to backport? |
Is the error showing up in the console output? That will make people report bugs (especially if it wasn't happening in 9.0). |
The The regression in 9.1 was many |
Dev console, are you talking about the debug window? Does it show up in the dashboard anywhere or in the app host console? |
Yes. See screenshots here: #7496
They just show up in the IDE debug console. These exceptions are all caught and ignored, but that doesn't stop them from appearing in the debug console. I created an issue about reducing how many times we throw exceptions to improve this situation: #7528 |
{ | ||
BackoffType = DelayBackoffType.Exponential, | ||
Delay = TimeSpan.FromMilliseconds(200), | ||
UseJitter = true, | ||
MaxRetryAttempts = 10, // Cumulative time for all attempts amounts to about 15 seconds | ||
MaxDelay = TimeSpan.FromSeconds(3), | ||
ShouldHandle = new PredicateBuilder().Handle<Exception>(), | ||
ShouldHandle = args => ValueTask.FromResult(!args.Outcome.Result), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about when an exception occurs that isn't Http NotFound? Should we retry on that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just had one question, the rest of the changes look fine to me.
Use
WaitAsync
again. Also, avoid throwingDistributedApplicationException
when restarting resource.