Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2000 > SQL Server 2000
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old May 17th, 2006, 03:44 PM
Registered User
 
Join Date: May 2006
Location: Brooklyn, NY, USA.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Timeout expired

Once in a wile am keep getting error messages in my web 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.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.]
   System.Data.SqlClient.SqlCommand.ExecuteReader(Com mandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream) +723
   System.Data.SqlClient.SqlCommand.ExecuteReader(Com mandBehavior behavior) +45
   System.Data.SqlClient.SqlCommand.System.Data.IDbCo mmand.ExecuteReader(CommandBehavior behavior) +5
   System.Data.Common.DbDataAdapter.FillFromCommand(O bject data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +304
   System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +77
   System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) +38
   GMI.DataAccessLayer.SQLCommandAndDataSet.ExecuteAn dFill(Boolean a_bPreserveCommandObject) +136
   GMI.DataAccessLayer.DataAccessLayer.CompanyUserDat aSet(String sSessionValue, String username, Guid mChanged_gUserSessionID) +72
   GMI.Intranet.DataEntry.Home.CreateRecentlyUsedComp aniesDataSource(String sSessionValue, String username, Guid mChanged_gUserSessionID) +37
   GMI.Intranet.DataEntry.Home.Page_Load(Object sender, EventArgs e) +1449
   System.Web.UI.Control.OnLoad(EventArgs e) +67
   System.Web.UI.Control.LoadRecursive() +35
   System.Web.UI.Page.ProcessRequestMain() +731


Please let me know what should i do in order to stop getting this messages. I am running SQL 2000 and .net C#. Any help would be gratly appretiated.
Greg

GL
Reply With Quote
  #2 (permalink)  
Old May 17th, 2006, 04:50 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Hudson, MA, USA.
Posts: 839
Thanks: 0
Thanked 1 Time in 1 Post
Default

You have a query which is taking too long to complete.

You have two options:

1. Make it run faster
2. Increase the timeout value on the command object. By default it is 30 seconds, which apparently isn't long enough for your query, at least sometimes.

Note that option 1 can be addressed by optimizing the query, getting a bigger box, or reducing the load on the box you have.

Option 2 just pushes the problem over the horizon, which may or may not be acceptable, at least in the short term.

Jeff Mason
Custom Apps, Inc.
www.custom-apps.com
Reply With Quote
  #3 (permalink)  
Old May 18th, 2006, 08:01 AM
Friend of Wrox
 
Join Date: Dec 2005
Location: , AZ, .
Posts: 146
Thanks: 0
Thanked 1 Time in 1 Post
Default

Use SQL Server Profiler to watch and see which queries take a long time to run. In this case you will need to watch RPC starting and T-SQL Batch Starting and see which queries don't have a corresponding End.

David Lundell
Principal Consultant and Trainer
www.mutuallybeneficial.com
Reply With Quote
  #4 (permalink)  
Old May 18th, 2006, 10:35 AM
Registered User
 
Join Date: May 2006
Location: Brooklyn, NY, USA.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by Greg Libo
I am all ready increased the time out in my web config file and it not halping. My query is not runnung a long time about 3 seconds so i do not know how to improve it better. Where exactly do you think i should increase the time out because i did it in the c# and web config as well and it doesn't help. May be i am missing something?
Thanks a lot in advence
GL

GL
Reply With Quote
  #5 (permalink)  
Old May 18th, 2006, 10:42 AM
Registered User
 
Join Date: May 2006
Location: Brooklyn, NY, USA.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by Greg Libo
Frankly i did not use the profiler so i do not have enough knowledge to conduct a test you recommende. Should i start running the application and at the same time start running the profiler. Whould you please be more specific in this case. May be it could help me to solve this problem.

Thank you very much in advence.

GL
GL
Reply With Quote
  #6 (permalink)  
Old May 18th, 2006, 12:37 PM
Friend of Wrox
 
Join Date: Dec 2005
Location: , AZ, .
Posts: 146
Thanks: 0
Thanked 1 Time in 1 Post
Default

First Open SQL Server Books On Line and read up on Profiler.
Then Open your app and get it right to the point where you just need to click a button to get the error.
Then Open Profiler, New Trace, Click start, then switch back to your app, and click the button to make it happen, when you get the error message switch back to Profiler and stop the trace.

David Lundell
Principal Consultant and Trainer
www.mutuallybeneficial.com
Reply With Quote
  #7 (permalink)  
Old July 21st, 2006, 11:58 AM
Registered User
 
Join Date: Jul 2006
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Here are a few hints:
1. find something else to do (car service?)
2. take English course or use spellchecker
3. Find someone to do it for you just like you did years ago
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Timeout Expired Error nikotromus SQL Server 2000 16 December 5th, 2006 03:54 PM
Timeout expired ks2006 ASP.NET 2.0 Basics 12 September 8th, 2006 03:54 PM
TimeOut Expired Lalit_Pratihari SQL Server 2000 1 July 23rd, 2006 12:59 PM
Timeout Expired Error vinod_pawar1 SQL Server 2000 5 July 17th, 2004 09:37 PM
Timeout expired ssingh SQL Server 2000 4 April 19th, 2004 11:10 AM



All times are GMT -4. The time now is 03:37 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.