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

ConnectRetryCount causes 10 second hangs on common EF tasks #148

Open
ajcvickers opened this Issue Dec 13, 2016 · 3 comments

Comments

Projects
None yet
4 participants
@ajcvickers
Copy link
Member

ajcvickers commented Dec 13, 2016

SQLClient now has a 10 second pause when attempting to connect to a database that does not exist. This means whenever EF does exists checks on a database that does not exist the user sees this 10 second pause. For example:

PM> Enable-Migrations
Checking if the context targets an existing database...
...hangs for 10 seconds...
Code First Migrations enabled for project EF6M2.
PM> 

We could consider:

  • Pushing back on SQLClient doing this by default since it effectively regresses EF, and probably also external customers doing similar things.
  • Changing the default connection strings that EF uses to have ConnectRetryCount=0.
@ErikEJ

This comment has been minimized.

Copy link
Contributor

ErikEJ commented Dec 13, 2016

Beware that ConnectRetryCount is only available in .NET 4.5.1 and later

@rowanmiller

This comment has been minimized.

Copy link
Member

rowanmiller commented Jan 20, 2017

@divega to add link to corefx issue

@divega

This comment has been minimized.

Copy link
Member

divega commented Jan 20, 2017

This issue is blocked on having a programmatic way to set control ConnectRetryCount on SqlConnection, which is requested at dotnet/corefx#14644.

@ajcvickers ajcvickers modified the milestones: 6.3.0, Backlog Aug 16, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment