0

我们正在迁移一些旧版 Web 应用程序以使用 Sql Server On Premise 中的 Azure 托管实例数据库,并且我们已经实现了基于SqlAzureExecutuionStrategy及其重试逻辑的连接弹性。

在我们的一项测试中,我们阻止了从应用服务器到 Azure 托管实例的连接。在测试期间,如果尝试了来自Microsoft.AspNet.Identitylib的方法,FindByIdAsync那么在引发最终错误之前会记录多组重试。例如,如果最大重试次数为 1,那么我们会看到预期的第一次重试,然后RetryLimitExceededException是预期会抛出的第二次重试。RetryLimitExceededException但是,在实际抛出之前,我们会看到另外两组重试。因此,总共有 6 次重试,而预期只有 2 次。最后一组在每个错误之前记录了一条附加错误消息:Failed to open connection asynchronously...

是否有我们缺少的配置设置来防止额外的重试集?

w3wp.exe Error: 0 : 2021-08-03 14:03:34.535 -04:00 [Error] Managed Thread Id: 20; Sql Error Number: 10060; Is Retriable Error Number: YES; Exception Count: 1; Exception Message: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 0 - A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.)
w3wp.exe Error: 0 : 2021-08-03 14:03:55.557 -04:00 [Error] Managed Thread Id: 20; Sql Error Number: 10060; Is Retriable Error Number: YES; Exception Count: 2; Exception Message: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 0 - A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.)
w3wp.exe Error: 0 : 2021-08-03 14:04:16.580 -04:00 [Error] Managed Thread Id: 20; Sql Error Number: 10060; Is Retriable Error Number: YES; Exception Count: 1; Exception Message: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 0 - A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.)
w3wp.exe Error: 0 : 2021-08-03 14:04:37.595 -04:00 [Error] Managed Thread Id: 20; Sql Error Number: 10060; Is Retriable Error Number: YES; Exception Count: 2; Exception Message: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 0 - A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.)
Failed to open connection asynchronously at 8/3/2021 2:04:59 PM -04:00 with error: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 0 - A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.)

w3wp.exe Error: 0 : 2021-08-03 14:04:59.625 -04:00 [Error] Managed Thread Id: 16; Sql Error Number: 10060; Is Retriable Error Number: YES; Exception Count: 1; Exception Message: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 0 - A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.)
Failed to open connection asynchronously at 8/3/2021 2:05:20 PM -04:00 with error: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 0 - A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.)

w3wp.exe Error: 0 : 2021-08-03 14:05:20.642 -04:00 [Error] Managed Thread Id: 9; Sql Error Number: 10060; Is Retriable Error Number: YES; Exception Count: 2; Exception Message: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 0 - A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.)
4

0 回答 0