-
Notifications
You must be signed in to change notification settings - Fork 299
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
SqlDataReader.GetStream(0).CopyToAsync hangs when CommandTimeout == 0 #1971
Comments
Hi @pacoteinnov, thanks for bringing this issue to our attention. When setting the |
If you could also provide the stack trace or provide eventsource trace when it's hung, it would also be very helpful for us. Thanks! |
|
|
Event source:
|
I have these two exceptions (that are not present without the CommandTimeout=0):
|
See #1903 - fixed in 5.1.1 |
Thanks @ErikEJ for spotting that. The v5.1.1 release should be out later today. |
Please try out the new v5.1.1 release and let us know or close the issue if this resolves your issue. Thanks! |
I confirm that the 5.1.1 release fixes the problems. Thanks! |
Describe the bug
SqlDataReader.GetStream(0).CopyToAsync hangs when CommandTimeout == 0 and transferring more than 7937 bytes.
To reproduce
The table with a FILESTREAM column but I guess it happens with a VARBINARY.
It does not hang if I change the CommandTimeout to int.MaxValue.
I can create a complete project if needed.
Expected behavior
No hangs when transferring data from a stream.
Further technical details
Microsoft.Data.SqlClient version: 5.1.0
.NET target: .NET 7
SQL Server version: SQL Server 2019
Operating system: Windows 10
The text was updated successfully, but these errors were encountered: