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.

Timeout for LINQ queries

See original GitHub issue

Describe the bug Request timeout set on CosmosClientBuilder using WithRequestTimeout is not respected by Container.GetItemLinqQueryable. When I run a heavy query, it does not return nor throw after the request timeout of 1 second passes.

I am aware that this request timeout is interpreted as a network request timeout, not an operation timeout. However, in this case, the client does not receive anything from the server. I put a breakpoint to the loop in CosmosLinqQuery.GetEnumerator() and I can see no results are returned before the timeout passes.

EDIT: What’s also troubling is that it keeps hanging indefinitely on localFeedIterator.ReadNextAsync. I left it running for a couple of minutes and it didn’t do anything. There surely must be some timeout enforced downstream, right?

To Reproduce Execute a heavy LINQ query and set a request timeout of 1 second.

Expected behavior The request timeout is respected.

Actual behavior The query keeps running even after the timeout period passes.

Environment summary SDK Version: 3.15.0 OS Version (e.g. Windows, Linux, MacOSX): Windows 10

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:14 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
skurikcommented, Jan 7, 2021

@j82w Done.

0reactions
bchong95commented, Feb 16, 2021

Issue does not seems to reproduce in the latest SDK verison.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Linq-to-SQL Timeout
This is how you can increase the time out for a query on a per query basis as supposed to modifying the connection...
Read more >
DataContext.CommandTimeout Property (System.Data.Linq)
Gets or sets a value that increases the time-out period (in seconds) for queries that would otherwise time out during the default time-out...
Read more >
Linq to Entity Connection Timeout, two Linq queries works ...
The magic starts when FindStatLinq takes 2 seconds to execute but FindStatMethod fails with EF Core execution timeout and it fails after about ......
Read more >
Change The Default CommandTimeout of LINQ DataContext
The default value of the DataContext class's CommandTimeout is set to 30 seconds. Any database queries taking a longer time to complete than...
Read more >
Performance really dfiferent if using Linq provider or raw sql
If I convert this raw SQL using Linq provider, the query now takes more than 10 seconds and sometimes a Timeout exception is...
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