Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/sql-server/21.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Sql server 不断地接受;“超时时间已过”;来自SQL Azure的会话状态提供程序(实体框架)_Sql Server_Azure_Timeout_Azure Sql Database - Fatal编程技术网

Sql server 不断地接受;“超时时间已过”;来自SQL Azure的会话状态提供程序(实体框架)

Sql server 不断地接受;“超时时间已过”;来自SQL Azure的会话状态提供程序(实体框架),sql-server,azure,timeout,azure-sql-database,Sql Server,Azure,Timeout,Azure Sql Database,我始终从ASP.NET 4.5 Windows Azure Web角色中的会话状态模块接收到一个错误,该模块指向SQL Azure数据库。会话状态模块正在使用dbcontext。 包括stacktrace在内的例外情况是: System.Data.EntityException: The underlying provider failed on Open. ---> System.Data.SqlClient.SqlException: Connection Timeout Expire

我始终从ASP.NET 4.5 Windows Azure Web角色中的会话状态模块接收到一个错误,该模块指向SQL Azure数据库。会话状态模块正在使用dbcontext。 包括stacktrace在内的例外情况是:

System.Data.EntityException: The underlying provider failed on Open. ---> System.Data.SqlClient.SqlException: Connection Timeout Expired.  The timeout period elapsed while attempting to consume the pre-login handshake acknowledgement.  This could be because the pre-login handshake failed or the server was unable to respond back in time.  The duration spent while attempting to connect to this server was - [Pre-Login] initialization=2; handshake=14993;  ---> System.ComponentModel.Win32Exception: The wait operation timed out
--- End of inner exception stack trace ---
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.TdsParserStateObject.ReadSniError(TdsParserStateObject stateObj, UInt32 error)
at System.Data.SqlClient.TdsParserStateObject.ReadSniSyncOverAsync()
at System.Data.SqlClient.TdsParserStateObject.TryReadNetworkPacket()
at System.Data.SqlClient.TdsParser.ConsumePreLoginHandshake(Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, Boolean& marsCapable)
at System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, Boolean withFailover)
at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, Boolean withFailover)
at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString connectionOptions, SqlCredential credential, TimeoutTimer timeout)
at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(TimeoutTimer timeout, SqlConnectionString connectionOptions, SqlCredential credential, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
at System.Data.SqlClient.SqlConnection.Open()
at System.Data.EntityClient.EntityConnection.OpenStoreConnectionIf(Boolean openCondition, DbConnection storeConnectionToOpen, DbConnection originalConnection, String exceptionCode, String attemptedOperation, Boolean& closeStoreConnectionOnFailure)
--- End of inner exception stack trace ---
at System.Data.EntityClient.EntityConnection.OpenStoreConnectionIf(Boolean openCondition, DbConnection storeConnectionToOpen, DbConnection originalConnection, String exceptionCode, String attemptedOperation, Boolean& closeStoreConnectionOnFailure)
at System.Data.EntityClient.EntityConnection.Open()
at System.Data.Objects.ObjectContext.EnsureConnection()
at System.Data.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption)
at System.Data.Objects.ObjectQuery`1.System.Collections.Generic.IEnumerable<T>.GetEnumerator()
at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1 source)
at System.Linq.Queryable.SingleOrDefault[TSource](IQueryable`1 source)
at System.Data.Entity.Internal.Linq.InternalSet`1.FindInStore(WrappedEntityKey key, String keyValuesParamName)
at System.Data.Entity.Internal.Linq.InternalSet`1.Find(Object[] keyValues)
at System.Web.Providers.DefaultSessionStateProvider.<>c__DisplayClass14.<SetAndReleaseItemExclusive>b__13()
at Microsoft.Practices.TransientFaultHandling.RetryPolicy.<>c__DisplayClass1.<ExecuteAction>b__0()
at Microsoft.Practices.TransientFaultHandling.RetryPolicy.ExecuteAction[TResult](Func`1 func)
at System.Web.SessionState.SessionStateModule.OnReleaseState(Object source, EventArgs eventArgs)
at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
System.Data.EntityException:基础提供程序在打开时失败。-->System.Data.SqlClient.SqlException:连接超时已过期。尝试使用登录前握手确认时超时。这可能是因为登录前握手失败或服务器无法及时响应。尝试连接到此服务器时所用的持续时间为-[Pre-Login]initialization=2;握手=14993;-->System.ComponentModel.Win32异常:等待操作超时
---内部异常堆栈跟踪的结束---
位于System.Data.SqlClient.SqlInternalConnection.OneError(SqlException异常,布尔断开连接,操作'1 wrapCloseInAction)
位于System.Data.SqlClient.TdsParser.ThroweException和Warning(TdsParserStateObject StateObjectStateObj、布尔调用方连接锁、布尔异步关闭)
位于System.Data.SqlClient.TdsParserStateObject.ReadsInError(TdsParserStateObject stateObj,UInt32错误)
位于System.Data.SqlClient.TdsParserStateObject.ReadsInSyncOverAsync()处
位于System.Data.SqlClient.TdsParserStateObject.TryReadNetworkPacket()处
位于System.Data.SqlClient.TdsParser.ConsumePreLoginHandshake(布尔加密、布尔信任服务器证书、布尔集成安全、布尔和marsCapable)
在System.Data.SqlClient.TdsParser.Connect(ServerInfo ServerInfo、sqlinternalconnectionds connHandler、Boolean ignoresnopentimeout、Int64 timerExpire、Boolean encrypt、Boolean trustServerCert、Boolean integratedSecurity、Boolean with failover)
位于System.Data.SqlClient.SqlInternalConnectionDS.AttemptOneLogin(ServerInfo ServerInfo、String newPassword、SecureString newSecurePassword、Boolean IgnoresInOpenTimeout、TimeoutTimer timeout、Boolean withFailover)
位于System.Data.SqlClient.SqlInternalConnectionDS.LoginOfAliver(ServerInfo服务器信息、字符串newPassword、SecureString newSecurePassword、布尔重定向EducserInstance、SqlConnectionString连接选项、SqlCredential凭证、超时超时)
位于System.Data.SqlClient.SqlInternalConnectionDS.OpenLoginList(超时计时器超时、SqlConnectionString连接选项、SqlCredential凭证、字符串新密码、SecureString NewSecureUserPassword、布尔重定向EduceInstance)
位于System.Data.SqlClient.SqlInternalConnectionDS..ctor(DbConnectionPoolIdentity、SqlConnectionString connectionOptions、SqlCredential凭据、对象providerInfo、String newPassword、SecureString newSecurePassword、Boolean redirectedUserInstance、SqlConnectionString userConnectionOptions)
位于System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions、DbConnectionPoolKey、Object poolGroupProviderInfo、DbConnectionPool、DBConnectionOwningConnection、DbConnectionOptions用户选项)
位于System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool池、DbConnectionOptions选项、DbConnectionPoolKey池键、DbConnectionOptions用户选项)
位于System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnectionOptions用户选项)
位于System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnectionOptions userOptions)
位于System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject、UInt32 waitForMultipleObjectsTimeout、Boolean allowCreate、Boolean OnlyOnEckConnection、DbConnectionOptions userOptions、DbConnectionInternal和connection)
位于System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject、TaskCompletionSource`1重试、DbConnectionOptions用户选项、DbConnectionInternal和connection)
位于System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection所有者连接、TaskCompletionSource`1重试、DbConnectionOptions用户选项、DbConnectionInternal和connection)
位于System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection、DbConnectionFactory connectionFactory、TaskCompletionSource`1重试、DbConnectionOptions用户选项)
位于System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1重试)
在System.Data.SqlClient.SqlConnection.Open()处
位于System.Data.EntityClient.EntityConnection.OpenStoreConnectionIf(布尔openCondition、DbConnection StoreConnectionOpen、DbConnection originalConnection、字符串例外代码、字符串尝试操作、布尔和CloseStoreConnectionUnfailure)
---内部异常堆栈跟踪的结束---
位于System.Data.EntityClient.EntityConnection.OpenStoreConnectionIf(布尔openCondition、DbConnection StoreConnectionOpen、DbConnection originalConnection、字符串例外代码、字符串尝试操作、布尔和CloseStoreConnectionUnfailure)
位于System.Data.EntityClient.EntityConnection.Open()处
在System.Data.Objects.ObjectContext.EnsureReconnection()中
位于System.Data.Objects.ObjectQuery`1.GetResults(可为null`1 forMergeOption)
位于System.Data.Objects.ObjectQuery`1.System.Collections.Generic.IEnumerable.GetEnumerator()
在System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1 source)处
位于System.Linq.Queryable.SingleOrDefault[TSource](IQueryable`1源)
位于System.Data.Entity.Internal.Linq.InternalSet`1.FindInStore(WrappedEntityKey,String keyValuesParamName)
位于System.Data.Entity.Internal.Linq.InternalSet`1.Find(对象[]keyValues)
在System.Web.Providers.DefaultSessionStateProvider.c__DisplayClass14.b__u13()中
在Microsoft.Practices.TransientFaultHandling.RetryPolicy.c__DisplayClass1.b__0()上
在Microsoft.Practices.TransientFaultHandling.RetryPolicy.ExecuteAction[TResult](Func`1 Func)
位于System.Web.SessionState.SessionStateModule.OnReleaseState(对象源,EventArgs EventArgs)
在System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecut