7

In our Vb.net application(userd within a local network connection inside a office), which is used from long time now some of the users get the errors only sometimes a day

A transport-level error has occurred when sending the request to the server. (provider: TCP Provider, error: 0 - An existing connection was forcibly closed by the remote host.

I have already checked following

  1. All databases are set to autoclose OFF

  2. Didn't find much network problems and network speed is good.

  3. When I checked in SSMS the under server properties remote query time-out set to 600 seconds

  4. I checked sql server log and no errors found relating to it or same error message

So what may be the reason for this error? And how to troubleshoot it?

8

If an application opens a connection (successfully) to SQL Server, and leaves it open in anticipation of sending a (or possible 'another') query, and in the meantime, SQL kills that connection for some reason (eg, service restarts, or a kill command is sent), then when the connection (which thinks it's open) tries to send a command, you'll get this error.

So catch the error in your application, and reconnect. Then try the command again.

4

I mostly see this error if for some reason the network connectivity was lost, even for a few seconds. That could be someone disconnecting a cable, an unstable wifi connection, a bad network switch, computer that goes to sleep (it's on by default on Win7 and up), Windows update updating a network driver, etc.

  • 1
    I have seen this happen over VPN connections as well. Not sure if that is the case here. – ses011 May 5 '14 at 23:12
2

I ran across the same error a while back and meant to post my answer, but I couldn't log in and simply forgot. I happened upon this question again and will give my answer as best as I can remember as it's quite obscure and I could find no mention of it anywhere else.

This error is returned from MS-SQL databases when passing some form of invalid date to an SP from .NET (and potentially other sources). IIRC, I was passing in a .NET MinDate (ie. default value). Basically, just check your date parameters and make sure they are sensible!

0

I got exactly the same error in my application. It updates many records in single transaction. I fixed this by increasing SqlCommand.CommandTimeout parameter.

-4

in my case this error getting if your C drive space low,and every second generate new logs files.

So resolution is all logs delete in c drive then working fine again.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.