node.js - Azure DB 断开连接和连接超时

标签 node.js azure azure-sql-database azure-web-app-service tedious

我们每隔几天就会遇到一次数据库断开连接和连接超时的“ Storm ”。

我们在 Azure WebApps 上运行 Node.js 并使用 tedious要连接 SQL Azure,有什么想法从哪里开始寻找问题吗?

最佳答案


您似乎遇到了超时。不幸的是,需要重试逻辑。使用正确的重试策略应该可以帮助您修复/减少超时和停机时间。
这是我的推荐:

int connectionTimeoutSeconds = 30;  // Default of 15 seconds is too short over the Internet, sometimes.
int maxCountTriesConnectAndQuery = 3;  // You can adjust the various retry count values.
int secondsBetweenRetries = 4;  // Simple retry strategy.

Here是 C# 的示例代码,您应该在 Javascript 中进行复制,这应该可以减少超时和停机时间。

如果这不能解决问题,请通过电子邮件将您的服务器名称和数据库名称发送至 microsoft dot com 的 mebha,我将让我们的一位工程师查看该问题。

最好,
认识巴格德夫
微软项目经理

关于node.js - Azure DB 断开连接和连接超时,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30995571/

相关文章:

node.js - npm 不适用于最新的稳定 Node ?

.net - 如何保护Azure存储/服务总线中的访问 key

Azure v2.0刷新 token ,返回另一个刷新 token

azure - 如何使用 SAS 下载 Blob

azure - 如何在 AZURE EASY API 中编写选择函数

node.js - Node JS : Sendgrid Mail 403 'Forbidden' error

node.js - return 语句如何在 Node 中工作

node.js - 如何在 Windows 上使用文件描述符 4(或其等价物)?

azure - 使用 Elastic Sc​​ale 移动 shardlet 并强制复制引用表的顺序

sql-server - 本地 SQL Server 数据库和 Azure SQL 数据库之间的两种方式同步