Connection timing out on some servers, not on others

  • I have some code written in ado.net which is wrapped in a transaction. Part of the process involves creating a connection to the server from outside the transaction to read some data. On our development server, the code runs fine, but on a client's server, it is blocking one of the tables and the select query from outside the transaction times out. I have ensured that there are no other connections to the database, so it is just this single instance of the program that is causing the problem. Are there any SQL Server settings that could be affecting this?

    I don't believe that it is a problem with the code, as the tables that are being blocked are only being read from inside the transaction, and the fact that it runs here in development should mean it definitely isn't the code. I have been unable to replicate the bug on our servers, but it happens 100% of the time in their environment. If it isn't a SQL Server setting, any ideas on what else I could look for?

  • Is it running on the same client in both cases? If not, you have two choices, client or server potential issues.

    You could have a different isolation level on each server or connection, which could cause the behavior. I'm not quite clear why you have blocking. Are you opening the connection from inside the transaction to read things?

  • Thanks for the response Steve. We got a call this morning and it emerged that 'we killed all other sessions' actually meant 'we killed all other sessions - except that one', which of course just happened to be a session running a process with a known bug. Oh well, problem fixed now anyway. Thanks for the help.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply