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

ajcvickers opened this Issue Dec 13, 2016 · 3 comments


None yet
4 participants
Copy link

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.

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.

This comment has been minimized.

Copy link

ErikEJ commented Dec 13, 2016

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


This comment has been minimized.

Copy link

rowanmiller commented Jan 20, 2017

@divega to add link to corefx issue


This comment has been minimized.

Copy link

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