Skip to content
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

WcfExceptionHandler with default configuration leads to 1 second delay in infrequently used channels #334

Open
andradf opened this issue Jul 8, 2022 · 0 comments

Comments

@andradf
Copy link

andradf commented Jul 8, 2022

When working with a NetTcp binding the defaults and most common usages tend to have the server close inactive channels after some inactivity, usually 10 minutes. This is manifested on the client by throwing an ObjectFaulted or ObjectAborted exception in a subsequent invocation. In scenarios where a channel is used infrequently, we've observed delays of 1-2 seconds due to WcfExceptionHandler using the retry policy provided to ServicePartitionClient to determine a retry wait time. The default retry policy is an exponential with a jitter of 2 seconds plus a base delay of 1 second, even for attempt 0 we get a minimum of 1 second and average of 2 second delays when it should be 0 for these types of errors. And even if we use a custom RetryPolicy instead of exponential , we don't have enough context in RetryDelayParameters to determine if it is being invoked due to an ObjectFaulted/ObjectAborted exception or due to a different transient failure that would justify having the delay (EndpointNotFoundException for example). The ideal solution would be for WcfExceptionHandler to return ExceptionHandlingRetryResult with a wrapper around the retry policy when it's a ObjectFaulted/ObjectAborted that woud return a 0 delay when the retryattempt is 0 or 1.

@andradf andradf changed the title WcfExceptionHandler with default configuration leads to 2 second delay in infrequently used channels WcfExceptionHandler with default configuration leads to 1 second delay in infrequently used channels Jul 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant