tags:

views:

96

answers:

2

I'm getting this error:

Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

I know that most of the time this problem is fixed by adding the commandtimeout property of a sqlcommand.

The problem is that I'm getting this error trying to do this:

Dim con as new SqlConnection("connstring")

con.open() ' bang!, i'm getting the error here.

The strange thing is that i'm getting the error when trying to open the connection, and the problem is intermitent, i mean I'm not getting this error always.

Any thoughts on how to solve this?, or what can be causing the error?

A: 

Is it possible you've maxed out connections to it? Are you closing all the connections you're opening?

Hardwareguy
yes, whe are using a common DAL library handling the connection closing.
Are you opening connections in a loop somewhere causing very many to be open at the same time?
Hardwareguy
A: 

Have you looked at the Event logs on both boxes (Assuming you are running seperate)? I would double check what connections are open even if i was using a DAL using sp_who2 or similar.

Otherwise maybe a dodgy network which wont be so easy to debug, you should see signs in the event logs of this.

Does increasing the connection timeout help? This is not a solution but may help you debug.

Matthew Pelser

related questions