Time Out Error

S

saurav ajm

Our application is running successfully on production server from last three month. Yesterday we received the error - Timeout Error: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. Our application is built in asp.net 2.0 and Sql server 2000. We are importing a large set of data in database using transaction object of ado.net. When I ran the same application on test database with same set of files I didn’t received any error. The problem is with sql server on production. We don’t want to set the time out property of command object. Can any one suggest me some solution?


EggHeadCafe.com - .NET Developer Portal of Choice
http://www.eggheadcafe.com
 
A

Alberto Poblacion

Our application is running successfully on production server from last
three month. Yesterday we received the error - Timeout Error: Timeout
expired. The timeout period elapsed prior to completion of the operation
or the server is not responding. Our application is built in asp.net 2.0
and Sql server 2000. We are importing a large set of data in database
using transaction object of ado.net. When I ran the same application on
test database with same set of files I didn’t received any error. The
problem is with sql server on production. We don’t want to set the time
out property of command object. Can any one suggest me some solution?

Make sure that you are closing all of your SqlConnections. If, under some
circunstances you fail to do a Close (for instance, if under some condition
you return from a method that had opened a connection, and you don't execute
the Close at the end of the method), then you will slowly leak connections.
Those connections do not get returned to the Pool. When this has happened
100 times (default), the next time that you try to open a connection you get
a timeout error, because the system is waiting for a connection to be
returned to the pool and they never get returned. Typically you do not
detect this error on the test environment, because the test process does not
go 100 times through the faulty routine that leaks connections, but you do
get the timeout in production because some other (possibly unrelated) page
accesses are consuming your connections.
 
I

Ignacio Machin \( .NET/ C# MVP \)

Hi,

Our application is running successfully on production server from last
three month. Yesterday we received the error - Timeout Error: Timeout
expired. The timeout period elapsed prior to completion of the operation
or the server is not responding. Our application is built in asp.net 2.0
and Sql server 2000. We are importing a large set of data in database
using transaction object of ado.net. When I ran the same application on
test database with same set of files I didn't received any error. The
problem is with sql server on production. We don't want to set the time
out property of command object. Can any one suggest me some solution?


It's not a good idea to import a large dataset using ADO.NET , you should
use SSIS or DTS in this case.
In the same way reproducing this kind of error tend to be difficult as it
depend of the server load among other conditions.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top