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

linq2db Configuration.ContinueOnCapturedContext #1859

Closed
thyn opened this issue Aug 9, 2019 · 9 comments
Closed

linq2db Configuration.ContinueOnCapturedContext #1859

thyn opened this issue Aug 9, 2019 · 9 comments
Assignees

Comments

@thyn
Copy link

thyn commented Aug 9, 2019

I 'm wondering why you are using Configuration.ContinueOnCapturedContext = true. it's used in ConfigureAwait. We have a lot of issues with awaiting cached tasks. It locks our iis.

@thyn thyn changed the title linq2db linq2db Configuration.ContinueOnCapturedContext Aug 9, 2019
@thyn
Copy link
Author

thyn commented Aug 9, 2019

May be it's possible to make changes at readme to recommend using ContinueOnCapturedContext = false.

@MaceWindu
Copy link
Contributor

well, I'm a bit lost here as it shouldn't change existing behavior because
await task should have same behavior as await task.ConfigureAwait(true)

@thyn
Copy link
Author

thyn commented Aug 9, 2019

May be you should remind about it at readme. It's really big problem. We've lost a day to found problem.

@MaceWindu
Copy link
Contributor

First of all I need to understand why it is a problem, because this change shouldn't change linq2db behavior at all

@thyn
Copy link
Author

thyn commented Aug 9, 2019

We are caching Task with result from db. Requests are attached to context and they never ends. After some time iis starts sending 503
Message "The serverRuntime@appConcurrentRequestLimit setting is being exceeded."

https://msdn.microsoft.com/en-us/magazine/jj991977.aspx?f=255&MSPPError=-2147217396

Microsoft recomendations for example.

@thyn
Copy link
Author

thyn commented Aug 9, 2019

It's not about change. We've started to cache some days ago.

@MaceWindu
Copy link
Contributor

MaceWindu commented Aug 9, 2019

Ahh, now it makes sense. I thought we broke something with this change. Will make notes to readme in this case

@MaceWindu
Copy link
Contributor

Answering your question in first message: we use it because it is default behavior for await and we don't want to break users who rely on it. This new option was added for cases like yours to override this behavior

@MaceWindu
Copy link
Contributor

Added to FAQ, will be up soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants