-
Notifications
You must be signed in to change notification settings - Fork 286
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
Reading binary data asynchronously hangs execution #2276
Comments
@mdzieg Did you try 5.2 preview 4? |
@ErikEJ added |
How do you load the 66 MB file? |
This POC uses my app database and I have data already in the table. I did not add data loading code to the POC, but can do so. edit: @ErikEJ updated POC code, now it loads data file; |
Thanks, duplicate of #593 |
Your use case is very large binary objects, and the improvements are better for smaller binary objects. Read the issue to understand the challenges involved, I do not think this is a high priority at the moment. IMHO saving 66 MB binary objects in a database is an anti pattern. Use a file system for that. |
Seems it will not be fixed any time soon then. Saving large binary objects to the database in most cases is an anti-pattern, I agree. I did not expect such a basic operation to hang our application. Now we are aware of the problem and will avoid async code with LBO. |
Can you reproduce it without all the entity framework stuff? If you can get me a sql client only repro I'll take a look and see if there's something other than the known issues occurring here. |
@Wraith2 I took the repro code and added this after the call to CreateData:
|
Closing as it is a duplicate of #593 |
Repro code can be found here: https://github.com/mdzieg/LBOTest/tree/main
Initialize database using SQL from readme. Update connection string in the code if needed.
Code inserts data file and then tries to load it.
When reading entity with binary data it hangs when using async method:
but works okay when using sync method:
This issue has its roots most likely in SqlClient library, although it was claimed fixed: #600
Include provider and version information
EF Core version: 8
Database provider: Microsoft.EntityFrameworkCore.SqlServer
Target framework: .NET 8.0
Operating system: WIN 11
IDE: N/A
The text was updated successfully, but these errors were encountered: