Hi @pawel-ostrowski_5669 ,
Unfortunately this is going to be tricky to troubleshoot, but in general a timeout will occur because SQL Server is taking too long to respond to a query. This typically related to query performance, but it can also be caused by network issues.
Looking at the stack traces you shared, these are very basic, highly performative queries that would instantly return a single row. There is nothing that should be slowing down those queries, which means could probably rule out query performance.
The fact that the timeouts occur randomly, during heavy and lighter load is also an indicator that it's probably not performance related, and a sign of network issues.
And finally, the fact that you profiled and didn't see any problems is a good sign this is not performance related. That's my current thinking at least.
Otherwise, I'm not familiar with "Attention" events. That must be something done internally by the driver? The SQL Server docs says this:
The Attention event class indicates that an attention event, such as cancel, client-interrupt requests, or broken client connections, has occurred. Cancel operations can also be seen as part of implementing data access driver time-outs.
I'm not sure what that means to be honest, but I found this article that might be of use:
https://www.red-gate.com/simple-talk/blogs/identifying-client-timeouts/
I think this would be worth getting Microsoft's SQL Server team involved, because we really don't know where to go form here, and they would have more experience troubleshooting this (especially if it's network-related) than we do.
Thanks,
Alana