Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
|
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 2nd, 2008, 09:04 AM
Friend of Wrox
 
Join Date: Oct 2005
Posts: 124
Thanks: 0
Thanked 1 Time in 1 Post
Default 'Timeout expired' error due to query or busyServer

We have been bothered with this error msg. Usually it shows up in the early moring. Later on when it is gone iwth a user it never shows up again all day long.

The problem is busy web server or ASPX coding error?
Can we increae the 'Timeout expired' time?

Thanks,
Jeffrey

Server Error in '/SSSS' 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:


Line 270: oDBCommand.Connection.Open()
Line 271:
Line 272: Dim myReader As SqlDataReader _
Line 273: = oDBCommand.ExecuteReader(CommandBehavior.CloseConn ection)
Line 274:


Source File: E:\SSS\Scheduling.aspx.vb Line: 272

Stack Trace:


[SqlException (0x80131904): Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.]
   System.Data.SqlClient.SqlConnection.OnError(SqlExc eption exception, Boolean breakConnection) +862234
   System.Data.SqlClient.SqlInternalConnection.OnErro r(SqlException exception, Boolean breakConnection) +739110
   System.Data.SqlClient.TdsParser.ThrowExceptionAndW arning(TdsParserStateObject stateObj) +188
   System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1956
   System.Data.SqlClient.SqlDataReader.ConsumeMetaDat a() +31
   System.Data.SqlClient.SqlDataReader.get_MetaData() +62
   System.Data.SqlClient.SqlCommand.FinishExecuteRead er(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +297
   System.Data.SqlClient.SqlCommand.RunExecuteReaderT ds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +903
   System.Data.SqlClient.SqlCommand.RunExecuteReader( CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +132
   System.Data.SqlClient.SqlCommand.RunExecuteReader( CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +32
   System.Data.SqlClient.SqlCommand.ExecuteReader(Com mandBehavior behavior, String method) +122
   System.Data.SqlClient.SqlCommand.ExecuteReader(Com mandBehavior behavior) +62
   SSS.Scheduling.GetNextAutoAppointment() in E:\SSSS\Scheduling.aspx.vb:272
   SSSS.Scheduling.Page_Load(Object sender, EventArgs e) in E:\SSSS\Scheduling.aspx.vb:61
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   System.Web.UI.Control.LoadRecursive() +47
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1061

---------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.832; ASP.NET Version:2.0.50727.832
__________________
C. Jeffrey Wang
 
Old May 2nd, 2008, 09:10 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

Maybe the server is doing something in that particular moment??? probably a backup?

HTH

Gonzalo

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from dparsons signature and he Took that from planoie's profile
================================================== =========
My programs achieved a new certification (can you say the same?):
WORKS ON MY MACHINE
http://www.codinghorror.com/blog/archives/000818.html
================================================== =========
I know that CVS was evil, and now i got the proof:
http://worsethanfailure.com/Articles...-Hate-You.aspx
================================================== =========
 
Old May 2nd, 2008, 09:20 AM
Friend of Wrox
 
Join Date: Oct 2005
Posts: 124
Thanks: 0
Thanked 1 Time in 1 Post
Default

Thanks. But the error happened only to this button_click. Is it possible that the we had a 'busy server' only for this long query?

Then the answer is long query, and busy server!?
 
Old May 2nd, 2008, 10:05 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

mmm.. what's the query???

HTH

Gonzalo

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from dparsons signature and he Took that from planoie's profile
================================================== =========
My programs achieved a new certification (can you say the same?):
WORKS ON MY MACHINE
http://www.codinghorror.com/blog/archives/000818.html
================================================== =========
I know that CVS was evil, and now i got the proof:
http://worsethanfailure.com/Articles...-Hate-You.aspx
================================================== =========
 
Old May 2nd, 2008, 12:18 PM
Friend of Wrox
 
Join Date: Oct 2005
Posts: 124
Thanks: 0
Thanked 1 Time in 1 Post
Default

Here is the composite query string.

Dim sSelect1 As String = "SELECT C.lname, C.fname, C.credentials, A.ApptsPK, A.ApptsConsultID, A.ApptsDate, A.ApptsTime, c.ool as ApptsLocation, A.RequestFKID, A.ApptsStatus, S.ConsultantCPSSpecCode, T.SpecID "

Dim sFrom1 As String = " FROM dbo.vwConsultantSpeciality S INNER JOIN dbo.vwSpeciality T ON S.ConsultantCPSSpecCode = T.SpecCD INNER JOIN Employee.dbo.SomaContacts C ON S.ConsultantPK = C.ContactPK INNER JOIN dbo.AppointmentsCurrentAvailableMin A ON S.ConsultantPK = A.ApptsConsultID "

Dim sOrder1 As String = " ORDER BY A.ApptsDate, A.ApptsTime "

Dim sWhere1 As String = " WHERE (S.ConsultantSpecActive = 1) AND t.specid = " & Session("RequestType").ToString & _
                " AND (A.ApptsDate > '" & strApptPreDate & "' OR (A.ApptsDate = '" & strApptPreDate & _
                "' AND A.ApptsTime >= '" & strApptPreTime & "' )) " & "AND (cast(A.ApptsDate as varchar(20)) + LEFT(A.ApptsTime, 5)) NOT IN" & _
                "(SELECT CAST(dbo.Appointments.ApptsDate AS varchar(20)) + LEFT(dbo.Appointments.ApptsTime, 5) AS timecheck " & _
                "FROM dbo.Requests LEFT OUTER JOIN dbo.Appointments ON dbo.Requests.RequestPK = dbo.Appointments.RequestFKID " & _
                "WHERE dbo.appointments.apptsdate is not null AND (dbo.appointments.ApptsStatus = 'B') and dbo.Requests.RequestStaffIDFK = " & intExaminerUserID & ")"

Dim sWhere2 As String
            sWhere2 = sWhere1 '& " AND (A.ApptsStatus = 'A' OR A.ApptsStatus = 'P') "

sSQL = sSelect1 & sFrom1 & sWhere2 & sOrder1
 
Old May 2nd, 2008, 01:06 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

Looks like a really complicate query... maybe the query takes too long, but after SQL somehow put it inside some internal cache and make it run faster???

did you pass this query into query analizer to try to make it run faster??

HTH

Gonzalo

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from dparsons signature and he Took that from planoie's profile
================================================== =========
My programs achieved a new certification (can you say the same?):
WORKS ON MY MACHINE
http://www.codinghorror.com/blog/archives/000818.html
================================================== =========
I know that CVS was evil, and now i got the proof:
http://worsethanfailure.com/Articles...-Hate-You.aspx
================================================== =========
 
Old May 2nd, 2008, 01:31 PM
Friend of Wrox
 
Join Date: Oct 2005
Posts: 124
Thanks: 0
Thanked 1 Time in 1 Post
Default

On another PC, I asked a co-worker to run the program. The first time, we waited for a while and quit.
Then we tried again and it worked just fine. Finally I went back to my PC and the program worked fine.

What's the problem? SQL Server DBMS? Long query is never a problem!? Why SQL Server DBMS failed that button-click only?

We had run that script on query analyzer before. The query showed the result 'immedialy'.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Login Timeout Expired error smnel ASP.NET 2.0 Basics 0 May 7th, 2008 06:58 AM
Timeout Expired Error dhara_adh SQL Server 2000 4 December 22nd, 2006 04:18 PM
Timeout Expired Error nikotromus SQL Server 2000 16 December 5th, 2006 03:54 PM
Timeout Expired Error dbalachandar SQL Server 2000 3 July 28th, 2006 01:35 AM
Timeout Expired Error vinod_pawar1 SQL Server 2000 5 July 17th, 2004 09:37 PM





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