-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Polly infinity retry in HttpClientProxies #2009
Comments
I will check it out. |
hi @chai93323 Can you explain it in detail? And the steps to reproduce. |
hi @maliming , you can just include throw new Exception("Polly Test"); on any service method. The exception will fail retry on method below then throw the polly retry exception.
|
@chai93323 |
@maliming how can we include own polly policy? Current policy cause issue on our environment. |
It is not currently customizable, but we can consider adding an option to configure it. I will try to implement it. |
Pls reopen this. I'm facing this issue as well.
I believe the problem is in ServiceCollectionDynamicHttpClientProxyExtensions
I moved the Polly config out of the for loop and it seems to fix the problem.
|
@techmouse84 This pr should solve your problem. #2038 |
@maliming ,
However, if i use the default setup, i still run into many retries instead of the expected number 3.
Maybe you can take a look at my previous post in details? |
@techmouse84 I tested it in a project created by cli. Not tried microservices. |
@techmouse84 see #2201 |
Currently when the service throw exception, Abp HttpClientProxies will infinity retry with polly and throw the exception below. How can I fix this issue or include new policy to disable polly without modify abp http client library?
TaskCanceledException: A task was canceled.
Polly.Retry.AsyncRetryEngine.ImplementationAsync(Func<Context, CancellationToken, Task> action, Context context, CancellationToken cancellationToken, ExceptionPredicates shouldRetryExceptionPredicates, ResultPredicates shouldRetryResultPredicates, Func<DelegateResult, TimeSpan, int, Context, Task> onRetryAsync, int permittedRetryCount, IEnumerable sleepDurationsEnumerable, Func<int, DelegateResult, Context, TimeSpan> sleepDurationProvider, bool continueOnCapturedContext)
The text was updated successfully, but these errors were encountered: