-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Evaluate if MultipleActiveResultSets is indeed necessary for SQL Server connections #15224
Comments
when this error occurs (and I have never seen it with workflows, which we use constantly), it tends to be a missing await somewhere, i.e. the session is being treated as thread safe BUT it is not There have been some hints that calling multilple |
All the issues you pointed to are closed. Can you describe a simple workflow that will make it fail so we can track the issue? |
I did some tests with the latest source and can't find any issues. I'll remove |
Hmm, was it rather with Audit Trail? I also did some quick checks with that but no issues. The mentioned 1.8 upgrade of ours is pending. |
Honestly Zoltan I would check any custom code you have. Everytime this has been reported (you can search the issues) it has been a missing await or an async void usage, or an odd combination of |
Most possibly yeah, I'll get back here once we have some experience with 1.8 in prod. |
cool, it happened to me recently when visual studio automatically added an async to an existing method that was already void, and because it was error handling code we didn't see it for three months until the error actually happened, and it went down into that await |
That's strange, because at least one of the analyzers should catch exactly this, chiefly |
Best I have a look a the AsyncFixer and see if it's badly configured then... thx |
@sarahelsaig could you please add here what you found with the Roles module? |
Sorry, I didn't notice your message. I have opened an issue about it yesterday here. |
OK, thanks. I'll close this less specific issue if we still don't find any MARS problems with 1.8.2 (upgrading DotNest is still in progress). |
@Piedone you should keep this open. @deanmarcussen Here are steps of how reproduce this issue (assuming you already have a default tenant with SaaS recipe)
Here is the exception
The |
@Piedone I think solving #15794 may solve this issue too "but not sure". This ticket is about whether or not we should use In my last comments, I showed by "as of now" this must be turned on otherwise we have a problem. @deanmarcussen stated the following
I think there is a real problem that we should look at here and ensure that |
I'll keep an eye out for it but I think this issue is invalid. In 1.8 we don't have any problems. In |
Probably the key takeaway here, is that YesSql is not threadsafe. When you get an error message from sql that I can't comment between the different versions of orchard involved, as we are currently on 1.6 and will remain there quite happily for some time. Good luck, never an easy issue to track down. |
Yeah, that's what we figured under the related issues. Let's close this and focus on the two other specific issues. |
Is your feature request related to a problem? Please describe.
For SQL Server, you have to specify
MultipleActiveResultSets=True;
in you connection string, otherwise Workflows will fail with "Putting the workflow in the faulted state. System.InvalidOperationException: The connection does not support MultipleActiveResultSets". There are apparently multiple cases of this too.However, I don't think we actually have to require MARS, and it should only be necessary if you do parallelized DB queries via the same DB connection, what you shouldn't.
Describe the solution you'd like
Figure out if we indeed need MARS, or we have unwanted parallelization. If the latter, then let's fix those. If we need MARS, then let's add validation like this: #15210
Describe alternatives you've considered
I can't think of anything else.
The text was updated successfully, but these errors were encountered: