Hi @Aspire , It is possible that you have reached the resource limitation of max concurrent workers (requests)
or max concurrent sessions
for the specific DTU or vCore provisioned database. Do you have any information from Log Analytics about what is causing the ExecuteReader to hang? For a thorough method of investigating the error, please see: Auditing for Azure SQL Database and Azure Synapse Analytics
My assumption given the amount of detail provided, I think that there is a thread exhaustion issue where either of the two resources identified above have reached their max or their is a thread pool issue that is being created based upon how you have implemented your logic for step 2. The following resources might be helpful:
- How to use batching to improve Azure SQL Database and Azure SQL Managed Instance application performance
- How to terminate a thread in C#?
If that information does not help to improve with efficiencies and thread optimization, then please leverage Log Analytics to capture this issue (if Log Analytics is not already enabled) and then investigate events to identify root cause.
Regards,
Mike