[20140504] ADO. NET client Timeout

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.