Closed divega closed 6 months ago
@robbpriestley thanks for reporting this. Could you provide more data on how to repro? E.g. what operating system and exact version of our bits are you using?
If you are using Linux what you are seeing might be related to https://github.com/dotnet/corefx/issues/4273, but that issue is supposedly fixed in RC1.
From @robbpriestley on March 31, 2016 16:22
Hello @divega
Sure thing. I am running OSX and here's my dnvm list
Active Version Runtime Architecture OperatingSystem Alias
------ ------- ------- ------------ --------------- -----
1.0.0-rc1-update1 coreclr x64 darwin
* 1.0.0-rc1-update1 mono linux/osx default
I skimmed the dotnet/corefx#4273 issue and it does seem to be similar. At least my gut feeling is that The connection is broken and recovery is not possible
is specific enough to suggest a connection. If it was fixed for Linux, perhaps not for OSX. (Although, I'm entirely not sure what MARS is)
Here's my project.json dependencies section as well
"dependencies": {
"System.Net.Security": "4.0.0-beta-22416",
"Microsoft.AspNet.IISPlatformHandler": "1.0.0-rc1-final",
"Microsoft.AspNet.Mvc": "6.0.0-rc1-final",
"Microsoft.AspNet.Mvc.TagHelpers": "6.0.0-rc1-final",
"Microsoft.AspNet.Tooling.Razor": "1.0.0-rc1-final",
"Microsoft.AspNet.Server.Kestrel": "1.0.0-rc1-final",
"Microsoft.AspNet.StaticFiles": "1.0.0-rc1-final",
"Microsoft.Extensions.Logging.Console": "1.0.0-rc1-final",
"Microsoft.Extensions.Logging.Debug": "1.0.0-rc1-final",
"EntityFramework.Core": "7.0.0-rc1-final",
"EntityFramework.Commands": "7.0.0-rc1-final",
"EntityFramework.Relational": "7.0.0-rc1-final",
"EntityFramework.MicrosoftSqlServer": "7.0.0-rc1-final",
"EntityFramework.MicrosoftSqlServer.Design": "7.0.0-rc1-final"
},
@robbpriestley MARS is the ability to process multiple active query results on the same connection at the same time. It is enabled in the connection string with this: "MultipleActiveResultSets=True".
I will move this issue to CoreFx since it seems to be a problem with SqlClient for .NET Core (and so that the right people can investigate) but please mention me if anything is required from the EF side.
@YoungGah, @saurabh500 This looks like it could be a similar issue to https://github.com/dotnet/corefx/issues/4273 but in OSX.
In summary: the customer explains that error "System.Data.SqlClient.SqlException: The connection is broken and recovery is not possible. The connection is marked by the server as unrecoverable. No attempt was made to restore the connection." occurs consistently when targeting a SQL Server instance in the cloud (Amazon RDS) if using SqlClient for .NET Core but not with Mono's built-in SqlClient implementation.
@robbpriestley @divega Do you folks know if the issue happens intermittently or consistently?
@robbpriestley what is the size of the data of the data you are querying from the server? Does this reproduce for an on premise server as well?
@saurabh500 I haven't tried to repro this myself. Hopefully @robbpriestley can help.
@divega Thanks. I will wait for @robbpriestley I was looking to get the kind of operations being tried by @robbpriestley so that we can try to replicate them.
I tried switching back and forth from coreclr to mono twice and it was consistent (worked in mono, not in coreclr).
It wasn't really a database query, you see it was a database migration. Still, minimal size. Basically a demo.
And sorry, I do not have an on-premise server to test on so I cannot say.
@robbpriestley What was the migration scenario? Was it copying a small database from one server to another? Are there any steps that I can try to reproduce this issue?
No, I mean, it's an Entity Framework migration.
I'm still pretty new to EF, but I think it's a very simple scenario. Repro is roughly like this:
dnvm use default -r coreclr
dnx ef database update
Let me know if you need any additional information.
Thanks @robbpriestley this is helpful.
@saurabh500 you're welcome. I realize this could be a difficult actual repro due to significant environmental specifics (Mac, AWS, SQL Server, etc)
Not to mention I may soon switch to MySQL anyway for other reasons.
But, I thought I'd report it anyway because I am an enthusiastic early adopter.
@robbpriestley Thanks for reporting the bug. We will try to get this to repro.
As recently announced in the .NET Blog, focus on new SqlClient features an improvements is moving to the new Microsoft.Data.SqlClient package. For this reason, we are moving this issue to the new repo at https://github.com/dotnet/SqlClient. We will still use https://github.com/dotnet/corefx to track issues on other providers like System.Data.Odbc and System.Data.OleDB, and general ADO.NET and .NET data access issues.
Closing as stale and not repro.
From @robbpriestley on March 23, 2016 19:27
Hello,
I'm pretty new to EF and .NET Core, but I just thought I'd report an issue I had today and have been able to diagnose somewhat. It has to do with the runtime and applying a migration. In my ASP.NET Core project, when I removed the dnx451 framework from project.json (intending instead to rely entirely on the dnxcore50 framework) and I perform the following actions:
I consistently get the below exception. To resolve, I need to restore the dnx451 framework in the project.json and use the mono runtime. Then, it works.
My database is SQL Server running on Amazon RDS.
Exception message:
Copied from original issue: aspnet/EntityFramework#4891