Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases 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 April 20th, 2005, 03:42 AM
Registered User
 
Join Date: Apr 2005
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to umertahir
Default ASP.Net: 'Timeout expired' Error

I have made a simple ASP.Net program which would pass parameters to the Stored Procedure in SQL Sever and would return back a row or two. The code is working fine when i try it on test DB which size about 3MB how ever if the code is tested on bigger size DB of about 2GB it will give this error:

Error

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.

Things I have checked:

1) I have tried putting the code in Try Block

Try

dbConnection.Open()

DataReader1 = dbCommand.ExecuteReader()

Herd_List.DataSource = DataReader1

Herd_List.DataBind()

DataReader1.Close()

dbCommand.Dispose()

Finally

dbConnection.Close()

End Try
dbConnection.Dispose()

2) Have made sure that connections are closed explicitly

Anyone kind enough to bring me out of this miserable condition ?

thanks in advance,

Umer

 
Old April 20th, 2005, 11:25 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
Default

I believe you need to change the timeout parameters in SQL Server.

 
Old April 21st, 2005, 03:39 AM
Registered User
 
Join Date: Apr 2005
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to umertahir
Default

I forgotten to mention..the query takes 0 Secs in query analyser taking same parameters in where clause to display the result.
Increasing timeout property even to 1000 wouldn't help and in my opinion timeout parameters shouldn't be changed as it will make user wait for more so this aint a good approach.

 
Old April 21st, 2005, 08:50 AM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
Default

0 seconds in Query Analyzer against the 3mb or 2GB database.

If it is a matter of the amount of data being pulled back, restructure your query. Also, rethink the reson for pulling so much data. Usually, it isn't necessary to pull so much back at one time.
 
Old May 9th, 2005, 08:49 PM
Registered User
 
Join Date: May 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to davidbong Send a message via Yahoo to davidbong
Default

Can I know how to change the parameters in SQL server 2000,Becuase I also got the same problem in my Vb.net application error log[u].(Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding)</u>.

Any other good solution beside change the timeout parameters in SQL server.
thanks

Anybody can reply me ASAP, Im in trouble for the banking system.:(
 
Old May 13th, 2005, 01:23 AM
Registered User
 
Join Date: Apr 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by umertahir
 I have made a simple ASP.Net program which would pass parameters to the Stored Procedure in SQL Sever and would return back a row or two. The code is working fine when i try it on test DB which size about 3MB how ever if the code is tested on bigger size DB of about 2GB it will give this error:

Error

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.

Things I have checked:

1) I have tried putting the code in Try Block

Try

dbConnection.Open()

DataReader1 = dbCommand.ExecuteReader()

Herd_List.DataSource = DataReader1

Herd_List.DataBind()

DataReader1.Close()

dbCommand.Dispose()

Finally

dbConnection.Close()

End Try
dbConnection.Dispose()

2) Have made sure that connections are closed explicitly

Anyone kind enough to bring me out of this miserable condition ?

thanks in advance,

Umer






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.