-
Notifications
You must be signed in to change notification settings - Fork 281
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
The connection does not support MultipleActiveResultSets #1074
Comments
There are two projects in this solution, the socket specific project is NetStandard2.0 and the application specific project is NetStandard 2.1
This particular exception is the first of 3 which ultimately results in disposal of the socket, and client removal.
The client will attempt to connect shortly thereafter.
Sometimes this happens once or twice in a row, recently we had 16 in a row in a four hour period.
We don’t really understand why this is happening and we have been struggling with this for a few years. The consequence is that data is not processed in time and we are missing “i-am-alive” data that is written to Azure Db, which we monitor with a function app. That triggers SMS/emails indicating there is a problem and someone needs to log in to VM and check things out. No peace of mind.
At this point I don’t think that we are convinced this code needs to run on a Linux box in the near future.
From: ***@***.***>
Sent: Wednesday, May 19, 2021 1:59 PM
To: ***@***.***>
Cc: ***@***.***>; ***@***.***>
Subject: Re: [dotnet/SqlClient] The connection does not support MultipleActiveResultSets (#1074)
@wvmstr<https://github.com/wvmstr>, Is everything exact similar to #971<#971>, but NetStandard? what version of NetStandard are you using 2.0 or 2.1? Can you check the workaround suggested in that issue by dropping connection and recreate it?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#1074 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AEW5DU4ZBQDEHHBEI46QNDLTOP4BPANCNFSM45DJHIRQ>.
|
Hi @wvmstr The issue is triggered by Socket exceptions that break the connection and it becomes unrecoverable. It is indeed a driver issue (#971) and we are investigating the right solution. To mitigate this issue, when you catch this exception, please "Dispose" this SqlConnection instance to prevent other queries from reusing this corrupted connection. I will close this as a duplicate and you may follow progress on #971 for further updates. |
Similar to: #971
This is a NetStandard app, running on Azure VM against SQL Server Express also on the VM. We don't use EF.
In this particular app we have field devices that are sending data to the socket, as well as receive instructions from the socket. These connections are long lasting. Let's say minute data.
This exception comes and goes. Sometimes, we don't see it for days, then other times we have a multitude in a day.
We are wondering if there is a solution that we can implement?
The text was updated successfully, but these errors were encountered: