Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 12»»

Timeout expired. The timeout period elapsed Expand / Collapse
Author
Message
Posted Monday, July 28, 2014 7:10 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: 2 days ago @ 12:59 PM
Points: 23, Visits: 191
I am currently running SQL 2014 in my production environment. Both machines are configured for Windows Failover Cluster Services so that we could take advantage of AlwaysOn Availability Groups.

Currently we are experiencing a issue where our web application is throwing an error, "Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding." I am pretty sure that the error is being thrown from the application, but I can't prove it. Because the error states it is SQL, the consensus seems to be that SQL is having the issue. I need to know how to troubleshoot it to ensure that SQL is not the problem.
Post #1596840
Posted Monday, July 28, 2014 12:07 PM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Monday, September 22, 2014 8:57 AM
Points: 50, Visits: 460
What is the timeout value in the application's connection string? This typically occurs when a query's processing time exceeds this value. You can increase the value or tune the query to run faster.
Post #1597011
Posted Monday, July 28, 2014 12:31 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: 2 days ago @ 12:59 PM
Points: 23, Visits: 191
That is the thing. I don't see that information in the error log. However, I ran a trace on the server and it appears that the application isn't sending the information over to the SQL server. It seems that it is hung up in the application.
Post #1597021
Posted Tuesday, July 29, 2014 12:59 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Friday, October 17, 2014 4:20 AM
Points: 124, Visits: 175
Generally timeout issue occurs because of the compatibility when an application uses Microsoft .net framework 3.5 or 4 data provider (sql client) to connect to the mirrored database.

Note: If ConnectionTimeout property is assigned a value of 15 seconds, user may receive error after connection is open for 1.2 seconds.

The timeout of the SQL ‘statement’ is set to 30 s by default. Timeout property is of the SQLCommand object. User can set property according to their requirements:

using (SqlCommand myCommand = new SqlCommand())
{
// Set the new command timeout to 60 seconds
// in stead of the default 30
myCommand.CommandTimeout = 60;
}
Post #1597164
Posted Tuesday, July 29, 2014 6:12 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 6:53 AM
Points: 13,890, Visits: 28,285
The issue, whatever is causing the slowdown, could very well be within SQL Server. Absolutely. But the timeout itself is controlled at the application connection setting.

So, to troubleshoot this, I wouldn't focus on the timeout. Instead, I'd set up monitoring on the server and start capturing long running queries, say ones that exceed 25 seconds, or long running transactions, same setting, in order to identify where the problem is coming from. You're on 2014, so the very best way to get this done is using extended events.


----------------------------------------------------
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood..." Theodore Roosevelt
The Scary DBA
Author of: SQL Server Query Performance Tuning
SQL Server 2012 Query Performance Tuning
SQL Server 2008 Query Performance Tuning Distilled
and
SQL Server Execution Plans

Product Evangelist for Red Gate Software
Post #1597240
Posted Tuesday, July 29, 2014 6:37 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: 2 days ago @ 12:59 PM
Points: 23, Visits: 191
Grant Fritchey (7/29/2014)
The issue, whatever is causing the slowdown, could very well be within SQL Server. Absolutely. But the timeout itself is controlled at the application connection setting.

So, to troubleshoot this, I wouldn't focus on the timeout. Instead, I'd set up monitoring on the server and start capturing long running queries, say ones that exceed 25 seconds, or long running transactions, same setting, in order to identify where the problem is coming from. You're on 2014, so the very best way to get this done is using extended events.



That is what I began to do; however, I noticed that the queries, when run directly from SQL, are running in less than a second. This is what has me confused. Am I missing some small detail in how SQL sends the data back?
Post #1597258
Posted Tuesday, July 29, 2014 6:46 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 6:53 AM
Points: 13,890, Visits: 28,285
mqbk (7/29/2014)
Grant Fritchey (7/29/2014)
The issue, whatever is causing the slowdown, could very well be within SQL Server. Absolutely. But the timeout itself is controlled at the application connection setting.

So, to troubleshoot this, I wouldn't focus on the timeout. Instead, I'd set up monitoring on the server and start capturing long running queries, say ones that exceed 25 seconds, or long running transactions, same setting, in order to identify where the problem is coming from. You're on 2014, so the very best way to get this done is using extended events.



That is what I began to do; however, I noticed that the queries, when run directly from SQL, are running in less than a second. This is what has me confused. Am I missing some small detail in how SQL sends the data back?


No. If the query completes, then it's down to the network to move the data out.


----------------------------------------------------
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood..." Theodore Roosevelt
The Scary DBA
Author of: SQL Server Query Performance Tuning
SQL Server 2012 Query Performance Tuning
SQL Server 2008 Query Performance Tuning Distilled
and
SQL Server Execution Plans

Product Evangelist for Red Gate Software
Post #1597263
Posted Thursday, July 31, 2014 6:46 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: 2 days ago @ 12:59 PM
Points: 23, Visits: 191
Thank you. I figured as much.
Post #1598226
Posted Wednesday, August 13, 2014 1:51 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: 2 days ago @ 12:59 PM
Points: 23, Visits: 191
It turned out that the configuration for the NIC teaming was the issue along with errors in the switches. Once they were corrected, the timeouts went away.
Post #1602992
Posted Thursday, August 14, 2014 8:42 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 6:53 AM
Points: 13,890, Visits: 28,285
mqbk (8/13/2014)
It turned out that the configuration for the NIC teaming was the issue along with errors in the switches. Once they were corrected, the timeouts went away.


Thanks for the follow up. Good to know what the root cause was, especially for anyone spotting this thread in a search of the internet.


----------------------------------------------------
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood..." Theodore Roosevelt
The Scary DBA
Author of: SQL Server Query Performance Tuning
SQL Server 2012 Query Performance Tuning
SQL Server 2008 Query Performance Tuning Distilled
and
SQL Server Execution Plans

Product Evangelist for Red Gate Software
Post #1603320
« Prev Topic | Next Topic »

Add to briefcase 12»»

Permissions Expand / Collapse