Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TimeOut Expired:

Status
Not open for further replies.

LJS1

Programmer
Apr 29, 2002
39
0
0
US
Hi,

When I am executing a SQL Server Stored procedure which is taking more than a min. through .ASPX code, i am getting the error.

Server Error in '/net' Application.
------------------------------------------------------------
Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

Any help.......?
Thanks in Advance.
LJS
 
Hi Terry,
The issue was
When executing a SQL Server 2000 Stored Procedure in ASP.NET that takes more than 30sec, it was showing timeout expired ( the error wrote in the 1st question)
The resolution is
Set the Connection String Time Out , ie connect timeout
and Set the Command Object Time Out ie CommandTimeOut to the desired time.
I hope this clears???
LJS
 
Thanks for the explanation. The explanation is much more helpful to other users who may read this thread than "I got it Working!!" The purpose of the Tek-Tips thread archive and search capability is to provide answers for others.

You may want to post a code snippet showing how to set the timeout value. This will help future readers of this thread even more. Terry L. Broadbent - DBA
Computing Links:
faq183-874 contains "Suggestions for Getting Quick and Appropriate Answers" to your questions.
 
Have you investigated why the stored procedure takes so long to run? Perhaps we can suggest chnges to improve performance. People get very annoyed when it takes this long to run something when they are on the Internet.

Why don't you post your stored procedure and we can take a crack at helping you tune it? Also include a listing of the fields the tables you access are indexed on.
 
Thanks for that suggestion SQLSister. I thought about that when I first saw this thread. Setting the timeout value can help resolve an immediate problem but it can also increase the problems. Improving performance should always be the first priority. Terry L. Broadbent - DBA
Computing Links:
faq183-874 contains "Suggestions for Getting Quick and Appropriate Answers" to your questions.
 
Terry, of course you thought of this when you saw the thread. Who do you think I learned it from!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top