SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Timeout expired. The timeout period elapsed


Timeout expired. The timeout period elapsed

Author
Message
mqbk
mqbk
Old Hand
Old Hand (337 reputation)Old Hand (337 reputation)Old Hand (337 reputation)Old Hand (337 reputation)Old Hand (337 reputation)Old Hand (337 reputation)Old Hand (337 reputation)Old Hand (337 reputation)

Group: General Forum Members
Points: 337 Visits: 360
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.
Jeff Shurak
Jeff Shurak
SSC-Addicted
SSC-Addicted (455 reputation)SSC-Addicted (455 reputation)SSC-Addicted (455 reputation)SSC-Addicted (455 reputation)SSC-Addicted (455 reputation)SSC-Addicted (455 reputation)SSC-Addicted (455 reputation)SSC-Addicted (455 reputation)

Group: General Forum Members
Points: 455 Visits: 763
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.
mqbk
mqbk
Old Hand
Old Hand (337 reputation)Old Hand (337 reputation)Old Hand (337 reputation)Old Hand (337 reputation)Old Hand (337 reputation)Old Hand (337 reputation)Old Hand (337 reputation)Old Hand (337 reputation)

Group: General Forum Members
Points: 337 Visits: 360
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.
Johnson Welch
Johnson Welch
SSCarpal Tunnel
SSCarpal Tunnel (4.5K reputation)SSCarpal Tunnel (4.5K reputation)SSCarpal Tunnel (4.5K reputation)SSCarpal Tunnel (4.5K reputation)SSCarpal Tunnel (4.5K reputation)SSCarpal Tunnel (4.5K reputation)SSCarpal Tunnel (4.5K reputation)SSCarpal Tunnel (4.5K reputation)

Group: General Forum Members
Points: 4503 Visits: 1166
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;
}
Grant Fritchey
Grant Fritchey
SSC Guru
SSC Guru (95K reputation)SSC Guru (95K reputation)SSC Guru (95K reputation)SSC Guru (95K reputation)SSC Guru (95K reputation)SSC Guru (95K reputation)SSC Guru (95K reputation)SSC Guru (95K reputation)

Group: General Forum Members
Points: 95525 Visits: 33013
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 and SQL Server Execution Plans
Product Evangelist for Red Gate Software
mqbk
mqbk
Old Hand
Old Hand (337 reputation)Old Hand (337 reputation)Old Hand (337 reputation)Old Hand (337 reputation)Old Hand (337 reputation)Old Hand (337 reputation)Old Hand (337 reputation)Old Hand (337 reputation)

Group: General Forum Members
Points: 337 Visits: 360
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?
Grant Fritchey
Grant Fritchey
SSC Guru
SSC Guru (95K reputation)SSC Guru (95K reputation)SSC Guru (95K reputation)SSC Guru (95K reputation)SSC Guru (95K reputation)SSC Guru (95K reputation)SSC Guru (95K reputation)SSC Guru (95K reputation)

Group: General Forum Members
Points: 95525 Visits: 33013
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 and SQL Server Execution Plans
Product Evangelist for Red Gate Software
mqbk
mqbk
Old Hand
Old Hand (337 reputation)Old Hand (337 reputation)Old Hand (337 reputation)Old Hand (337 reputation)Old Hand (337 reputation)Old Hand (337 reputation)Old Hand (337 reputation)Old Hand (337 reputation)

Group: General Forum Members
Points: 337 Visits: 360
Thank you. I figured as much.
mqbk
mqbk
Old Hand
Old Hand (337 reputation)Old Hand (337 reputation)Old Hand (337 reputation)Old Hand (337 reputation)Old Hand (337 reputation)Old Hand (337 reputation)Old Hand (337 reputation)Old Hand (337 reputation)

Group: General Forum Members
Points: 337 Visits: 360
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.
Grant Fritchey
Grant Fritchey
SSC Guru
SSC Guru (95K reputation)SSC Guru (95K reputation)SSC Guru (95K reputation)SSC Guru (95K reputation)SSC Guru (95K reputation)SSC Guru (95K reputation)SSC Guru (95K reputation)SSC Guru (95K reputation)

Group: General Forum Members
Points: 95525 Visits: 33013
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 and SQL Server Execution Plans
Product Evangelist for Red Gate Software
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search