This appears to have started happening a week, maybe two weeks ago. Essentially, we cannot figure out whether it is the server or the client that is periodically pausing between SQL statements. In the image attached, there are two sets of back-to-back events from a client. Notice that the EndTime of the preceding row is about half a second from the StartTime of the next row.
I expanded the window enough to show it happen twice. In a 20 second trace, it very consistently shows up every half second, i.e. a few good back to back 3-10ms round trips, then a 500ms gap, then more 3-10ms round trips.
As far as the client app goes, there is no sleep or timer between the two statements. In fact, the same client app run from the SQL Server VM itself (on AWS) does not exhibit this behaviour.
What is causing this? Is there a new vulnerability in SQL Server drivers that has been hot-fixed by slowing client packet reception by just refusing remote traffic every half second??
Two sample connection strings (both exhibiting this behaviour)
- Driver={ODBC Driver 18 for SQL Server};Server=server;Database=dbname;UID=userid;PWD=mypassword;
- Provider=SQLNCLI11.1;Password=mypassword;Persist Security Info=True;User ID=userid;Initial Catalog=dbname;Data Source=server;
sp_WhoIsActive
during the timeframe of when this issue occurs to see what's running and maybe derive any clues either from the blocking sessions or the wait types in thewait_info
column.