| Author |
Message |
SQLAdminCJ
Joined: 28 Dec 2011 Posts: 10
|
Posted: Wed Jun 20, 2012 8:43 am Post subject: How to reduce exceptions due to timeouts |
|
|
Hey all,
My firm has been using the SDK to compare databases on servers at different locations. Unfortunately, it keeps crashing due to connectivity issues.
It crashes with exceptions such as:
System.Data.SqlClient.SqlException (0x80131904): A transport-level error has occurred when receiving results from the server. (provider: TCP Provider, error: 0 - The specified network name is no longer available.)
and
System.Data.SqlClient.SqlException (0x80131904): Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
These problems are due to intermittent connectivity issues between the servers. I imagine that if I can increase the logout time I could reduce the incidence of these crashes. However, I'm not sure whether or not to change it in the connection string in the code for the diff utility or in the parameters of the SQL server instances being compared.
Does anyone have any ideas on how I can troubleshoot this issue? I would appreciate any advice anyone can provide.
Thanks. |
|
| Back to top |
|
 |
Brian Donahue
Joined: 23 Aug 2004 Posts: 6369 Location: Red Gate Software
|
Posted: Thu Jun 21, 2012 4:02 pm Post subject: |
|
|
Hello,
Even though you can adjust the timeout at the connection string, this is only the connection timeout - you are more than likely wanting to set the query timeout, which is actually hard-coded.
You can also consider avoiding Named Pipes connections, as they are an additional level of complexity over TCP/IP. If you don't need to use Named Pipes, you can force the connection to use TCP by prefacing the server name with "TCP:", for instance, use TCP:localhost for the server name.
The obvious answer is, fix the problems with the network. But that could be a complicated endeavor. _________________ Brian Donahue
Technical Support
Red Gate Software Ltd.
44 (0)870 160 0037 ext 8521
US and CAN 1-866-RED GATE ext 8521 |
|
| Back to top |
|
 |
SQLAdminCJ
Joined: 28 Dec 2011 Posts: 10
|
Posted: Fri Jun 22, 2012 9:34 pm Post subject: Re: |
|
|
This helped me understand the issue better. I will run the idea of forgoing named pipes with my manager. Thank you.
| Brian Donahue wrote: |
Hello,
Even though you can adjust the timeout at the connection string, this is only the connection timeout - you are more than likely wanting to set the query timeout, which is actually hard-coded.
You can also consider avoiding Named Pipes connections, as they are an additional level of complexity over TCP/IP. If you don't need to use Named Pipes, you can force the connection to use TCP by prefacing the server name with "TCP:", for instance, use TCP:localhost for the server name.
The obvious answer is, fix the problems with the network. But that could be a complicated endeavor. |
|
|
| Back to top |
|
 |
|
|
All times are GMT + 1 Hour
|
| Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group