应用程序见解:SQL 依赖结果代码“-2”

Application insights: SQL Dependency result code "-2"

这是我从 ~200 万 SQL 依赖 AI 注册中得到的~20。

显然这个结果代码没有出现在 sys.messages 中,因为那里的所有消息 ID 都是正数。

此外,我似乎找不到关于此错误的任何堆栈跟踪信息。这似乎是超时或一般瞬态错误(由我这边的 Polly 处理),但无论哪种方式,它都是在依赖项下注册的,而不是异常。

有人知道这个错误是什么吗?我在哪里可以找到有关我可能遇到的所有可能的 SQL 依赖错误的更多信息?

我已将此问题提交给应用洞察团队 here,并得到反馈:

 -2 means Timeout expired. The timeout period elapsed prior to completion of the 
operation or the server is not responding. (Microsoft SQL Server, Error: -2).

Sql 异常编号为 here

如果您有任何疑虑,请在 thread 发表评论。希望对你有帮助。