A recent project feedback, at the end of the month when a functional response abnormal lag, the rule is that as long as a long time a large query execution, the affected function will not be used normally. Suspected blocking issues, the database level to track the discovery of no blocking and other exceptions, tracking the affected function, found that there is no time-consuming SQL, but there is a long time interval between the two SQL case. At the same time check the Fiddler tracking webservices Information, found that there is a webs duration is very long. It is speculated that thread blocking may occur for the application server. When the problem recurs, crawl the w3wp.exe process dump. The analysis process is as follows:
First check if there is a thread blocking situation, found that the system currently has a thread blocking, where the blocking source is Line 94
Check thread Status
Find the following Line 96 lines waiting
Print blocking source Line Line 94
View Line 96 thread stack information, waiting in Calculateex ()
Combined with anti-compilation code, check that the granularity of the lock at the corresponding location is too large ...
https://blogs.msdn.microsoft.com/tess/2006/01/09/a-hang-scenario-locks-and-critical-sections/
Analysis of performance problems caused by thread blocking