Azure SQL数据库操作超时

Zuz*_*zlx 5 entity-framework timeout azure azure-sql-database

我有一个完美的共享主机网站"生产".它有用户,到目前为止我没有问题.

我决定创建一个测试环境.我创建了另一个Azure应用程序并将代码从我的"生产"站点复制到此测试站点.这发生在今天.它没有用户.我创建了一个数据库,我同意每月支付5美元.所以这不是一个免费帐户.我上传了我的种子数据,其中一部分是40K行的邮政编码.没有问题,这很好.

但是,当我使用该网站时,我始终如一timeout error.我可以向你保证,这不是因为使用.我在连接字符串中将超时从30增加到90,但这没有什么区别.生产和测试之间没有代码差异.

我已经阅读了很多关于此的帖子但没有帮助.以下是一些示例:

post1 post2 post3 post4 post5 post6

有任何想法吗?

> [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
Run Code Online (Sandbox Code Playgroud)

用法图

Zuz*_*zlx 6

这是DTU问题.我有5个DTU(S0)现在我有20个DTU(S1).如果我拥有物理学权利,它就像蒸汽机和BTU.马力很重要.

  • 我们遇到了同样的问题 - 结果我们运行的是一个SSIS软件包,它最大化了DTU,我们的网络应用程序得到了"尝试连接到路由目的地时发生了这个故障".需要更多的马力. (2认同)