【发布时间】:2016-05-08 18:40:28
【问题描述】:
我有一个完美运行的共享托管站点“生产”。它有用户,到目前为止我没有任何问题。
我决定创建一个测试环境。我创建了另一个Azure 应用程序并将代码从我的“生产”站点复制到这个测试站点。这发生在今天。它没有用户。我创建了一个数据库,并同意每月支付 5 美元。所以这不是一个免费帐户。我上传了我的种子数据,其中一部分是 40K 行邮政编码。一切顺利,没有问题。
但是,当我使用该网站时,我始终收到timeout error。我可以向你保证,这不是因为使用。我将连接字符串中的超时时间从 30 增加到 90,但这并没有什么不同。生产和测试之间没有代码差异。
我已经阅读了很多关于此的帖子,但没有任何帮助。以下是一些示例:
post1post2post3post4post5post6
有什么想法吗?
> [Win32Exception (0x80004005): The wait operation timed out]
>
> [SqlException (0x80131904): Timeout expired. The timeout period
> elapsed prior to completion of the operation or the server is not
> responding. This failure occurred while attempting to connect to the
> routing destination. The duration spent while attempting to connect to
> the original server was - [Pre-Login] initialization=27; handshake=25;
> [Login] initialization=0; authentication=0; [Post-Login] complete=3;
> ] System.Data.SqlClient.SqlConnection.OnError(SqlException
> exception, Boolean breakConnection, Action1 wrapCloseInAction)
> +2418094 System.Data.SqlClient.SqlInternalConnection.OnError(SqlException
> exception, Boolean breakConnection, Action1 wrapCloseInAction)
> +5694436 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject
> stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) +285
> System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior,
> SqlCommand cmdHandler, SqlDataReader dataStream,
> BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject
> stateObj, Boolean& dataReady) +3731
> System.Data.SqlClient.SqlDataReader.TryConsumeMetaData() +58
> System.Data.SqlClient.SqlDataReader.get_MetaData() +89
> System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds,
> RunBehavior runBehavior, String resetOptionsString) +379
> System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior
> cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean
> async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader
> ds, Boolean describeParameterEncryptionRequest) +2064
> System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior
> cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String
> method, TaskCompletionSource`1 completion, Int32 timeout, Task& task,
> Boolean asyncWrite) +375
> System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior
> cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String
> method) +53
> System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior
> behavior, String method) +240
> System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior
> behavior) +41
> System.Data.Common.DbCommand.ExecuteReader(CommandBehavior behavior)
> +12 System.Data.EntityClient.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand
> entityCommand, CommandBehavior behavior) +435
【问题讨论】:
-
当您遇到超时时,您消耗的 DTU 百分比是多少?
-
@JosephIdziorek 再次感谢约瑟夫的帮助。我在问题中添加了使用图。这能回答你的问题吗?
标签: entity-framework azure timeout azure-sql-database