我们有"暴风雨"数据库断开连接和连接超时每两天一次。
我们在Azure WebApps上运行Node.js并使用tedious连接SQL Azure,任何想法从哪里开始寻找问题?
答案 0 :(得分:2)
你似乎有超时。不幸的是,需要重试逻辑。使用正确的重试策略可以帮助您修复/减少超时和停机时间。
这是我建议的:
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中进行复制,这样可以减少您的超时和停机时间。
如果这不能解决问题,请发送电子邮件至microsb dot com的mebha服务器名和dbname,我将让我们的工程师查看。
最佳,
认识Bhagdev
微软项目经理