We have a WCF Data Service connecting to a SQL Server 2008 R2 database. When the service is trying to access data from the database the connection is getting timed out before the Connection Timeout value and the timeout exception is thrown.
This is the connection string:
Data Source=XXXX;Initial Catalog=XXXX;MultipleActiveResultSets=False;
Connection Timeout=80;Integrated Security=false;User ID=XXX;Password=XXX
In this connection string, even though we gave 80sec as the Connection Timeout
, the connection gets timed out at around 700ms and throws below exception
System.Data.SqlClient.SqlException (0x80131904): Timeout expired.
The timeout period elapsed prior to completion of the operation or the server is not responding.
This is happening on some queries only.
Any help is appreciated.