Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Application insights: SQL Dependency result code "-2"

This is what I get in ~20 out of ~2M SQL dependency AI registrations.

Azure portal screenshot

Apparently this result code does not appear in sys.messages, since all message id's in there are positive.

Also I can't seem to find any stack trace information on this error. It seems to be a timeout or general transient error (handled by Polly from my side), but either way it's registered under dependencies and not exceptions.

Does anybody know what this error is and where I can find more information regarding all possible SQL dependency errors I might get?

like image 305
George Gkionis Avatar asked Sep 05 '26 09:09

George Gkionis


1 Answers

I have submitted this issue to app insights team here, and just get feedback:

 -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).

The Sql Exception number is here.

And if you have any concerns, please comment at that thread. Hope it helps.

like image 101
Ivan Yang Avatar answered Sep 08 '26 06:09

Ivan Yang



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!