background:The client time-out has always occurred recently, so System.Data.SqlClient.SqlException (0x80131904): Timeout expired is used to troubleshoot. The timeout period elapsed prior to completion of the operation or the server is not responding. Principle: Client component timeout, generally divided into connection timeout and command timeouttime-outs are mainly in the following areas: 1.get a connection timeout from a connection pool 2.Create a new connection timeout 3.Send a command (Command) to the database timeout 4.Use withContext Connection=truethe properties of the Connection Send command (Command) to the database timeout. 5.when the Send command is not displayed (implicitly) to the database timeout. 6.timed out when executing an asynchronous command 7.time-out when fetching records from the server 8.UseBulk Copytime-out. Above8One, most of the front2One is belong toConnection Timeout, the others areCommand Timeout。 Analysis: From the error point of command timeout reported error, the client command timeout generated under the environment, the default is 30 seconds. In the database monitoring layer, we set up the xevent to more than 10s query monitoring, as well as the hand-written plug more than 10s monitoring, the middle did not find a blockage situation. You can then exclude 6 and time out when executing the command. and do not useContext connection=true So you can rule out 4, withThe context connection=true property sends command commands. bulk copy is not used, so the 8th can also be ruled out. throughSYS. dm_os_ring_buffers also found no active disconnects from SQL Server. Conclusion: This can be considered a timeout that occurs when the client obtains the result or sends a command. Reference: theSQL Server 2012 Implementation and Management Practical guideChapter 4th, Chapter 6th