?
Solved

Timeout in SQLServer 2008

Posted on 2013-10-29
3
Medium Priority
?
463 Views
Last Modified: 2013-11-04
Hello,

We didn't know that we have any kind of problem in our system related to the database.

But we have been analysing the timeout errors registered from the .NET aplication, we can see that sometimes the error "Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding" happens in query's with an average response time of less than 100 miliseconds.
The timeout of the .NET connection is 60s.

So seems that we have a process that cause to colapse the system.

In order to get the guilty, we want to establish a timeout for the worker processes in SQL Server, in order that anyone that use more than 50 seconds, has to be killed.

Does somebody know how to fix in SQLServer a limit/timeout for querys/processes/jobs?

Thanks in advance,
0
Comment
Question by:Jaimesastre
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 8

Accepted Solution

by:
virtuadept earned 1500 total points
ID: 39609032
This is a common problem. I do not know of any built in setting for this, but you can run DBA scripts that can do it.

Here is one that I found that attempts to send and email about the processes that will be killed before killing:

http://connectsql.blogspot.com/2012/09/sql-server-automatically-detect-and.html

Here is another one:

http://jasonhall.blogs.sqlsentry.net/2010/02/auto-kill-long-running-blocks-on-sql.html

These links have code examples and discussion about the issue.
0
 
LVL 40

Expert Comment

by:lcohan
ID: 39609169
<<
In order to get the guilty, we want to establish a timeout for the worker processes in SQL Server, in order that anyone that use more than 50 seconds, has to be killed.

Does somebody know how to fix in SQLServer a limit/timeout for querys/processes/jobs?
>>


You can set the Query timeout in SQL SSMS Properties on the "Connections" option like in attached picture however...I would strongly advise to NOT do that on production servers as this can cause lots of data issues - as you can see the SQL default is 600 seconds or ten minutes.
SQLProperties.png
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question