question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SDK Does Not Respect Configured Timeout

See original GitHub issue

We are continuously addressing and improving the SDK, if possible, make sure the problem persist in the latest SDK version.

Describe the bug In the case of ServiceUnavailable (503) error when querying database, the SDK doesn’t respect the configured timeout. Timeout is configured during client initialization using CosmosClientOptions.RequestTimeout property.

CosmosClientOptions cosmosClientOptions = new CosmosClientOptions() { RequestTimeout = 500 };

To Reproduce

Expected behavior SDK should terminate the call and return control to the caller once request time exceeds the configured timeout.

Actual behavior SDK doesn’t terminate the call and blocks the caller for much more time than what it is configured during client initialization.

Environment summary SDK Version: cosmos-netstandard-sdk/3.23.1 OS Version Windows/10.0.17763

Additional context cosmosDbClientLogs.txt

Issue Analytics

  • State:closed
  • Created 7 months ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
aavasthycommented, Feb 14, 2023

@aavasthy, that means in 5 seconds the caller should have received an exception. But that did not happen. As you can see in the log, the request was blocked for at least 35 seconds (It may have been more than this).

@Jasen-Quadras when you say at least 35s(2100 ms) are you mentioning the total “duration in milliseconds”:34491.8583 that we see in the summary diagnostics?

1reaction
ealsurcommented, Feb 9, 2023

@aavasthy Can you take a look at the attached diagnostics and reply to this question?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Configurable timeout for chat developed using Service SDK
Chats developed for Android or iOS using Service SDK does not timeout based on the Chat button settings. Service SDK should have a ......
Read more >
In a swift iOS application that uses the Amazon iOS SDK ...
Reporting the same issue here. Mine is related to uploads, rather than downloads, but the timeout does not seem respected and, if the...
Read more >
The operation has timed out - .NET SDK
We are intermittently receiving send timeout exceptions from the client SDK. The Exception on the OperationResult object only yields “Couchbase.
Read more >
Retries and timeouts - AWS SDK for .NET
The AWS SDK for .NET can retry requests that fail due to server-side throttling or dropped connections. There are two properties of service...
Read more >
Security Policies Profiles for the SDK
Security Policies profiles offer security controls for SDK-built apps. Control security with authentication methods, tunneling app traffic, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found