Existing connection was forcibly closed

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
ninken
Posts: 8
Joined: Thu 05 Apr 2007 18:31
Location: USA

Existing connection was forcibly closed

Post by ninken » Fri 18 Jul 2008 17:21

SDAC 4.50 - SQL2005

I've been getting this message on 5% of my clients, and always the same clients.

"TCP Provider: An existing connection was forcibly closed by the remote host."

Everything works great for everyone else, I've checked for Server Configuration Issues, Network Issues, and I can't reason why I'm getting this problem. All the Clients are Hire-wired to 1000gb connection. I know this sounds like not a SDAC problem, but I was wondering if anyone had Connection Configuration tips that I can set to help make sure the connection is not forcibly Closed by MSSQL? Also I only started getting this problem after I upgraded from SQL2000 to SQL2005 and SDAC 3+ - SDAC 4.5.

I look forward to any suggestions!

Thanks Ken

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Mon 21 Jul 2008 07:59

Try to install the latest version of SQL Server Native Client on the client computer. You can download it by this link.

ninken
Posts: 8
Joined: Thu 05 Apr 2007 18:31
Location: USA

Problem Found I think

Post by ninken » Mon 21 Jul 2008 15:51

I went to install the native client, and found a newer one is already installed.
All the machines that are having problems are XP Pro SP3. Is there an issue here with SP3?

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Tue 22 Jul 2008 08:12

I performed some tests on Windows XP SP3 and found no problems. Please contact me by e-mail at evgeniyd*devart*com, I will send you a small test application. Also specify, on what operations does the problem arise. Does the problem arise on each Windows XP SP3, or there are Windows XP SP3 free from this error?

nabendu.misra
Posts: 2
Joined: Wed 09 Jul 2008 11:27

Try this one out. It will help.

Post by nabendu.misra » Thu 24 Jul 2008 14:19

Please check this link in advance,
http://support.microsoft.com/kb/942861
and please take more time attention on the the following two paragraphs
Error message 3
System.Data.SqlClient.SqlException: 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.)
You may also receive one of these error messages when the network load on SQL Server is high. For example, you may receive one of these error messages when you replicate databases in SQL Server. Or, you may receive one of these error messages when a multiple-user application accesses databases in SQL Server.

WORKAROUND
loadTOCNode(1, 'workaround');
Important This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following article number to view the article in the Microsoft Knowledge Base:
322756 (http://support.microsoft.com/kb/322756/) How to back up and restore the registry in Windows


To work around this problem, disable the TCP Chimney Offload feature. To do this, follow these steps:
1. Click Start, click Run, type cmd, and then press ENTER.
2. At the command prompt, type the following command, and then press ENTER:
Netsh int ip set chimney DISABLED
Note You do not have to restart the server after you run this command.
If the performance of Windows Server 2003 decreases after you disable the TCP Chimney Offload feature, follow these additional steps:
1. Click Start, click Run, type Regedit, and then click OK.
2. Locate the following registry subkey:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
3. Double-click the EnableTCPChimney registry entry.
4. In the Edit DWORD Value dialog box, type 0 in the Value data box, and then click OK.
5. Double-click the EnableRSS registry entry.
6. In the Edit DWORD Value dialog box, type 0 in the Value data box, and then click OK.
7. Double-click the EnableTCPA registry entry.
8. In the Edit DWORD Value dialog box, type 0 in the Value data box, and then click OK.
9. Restart the server.

Thanks and Regards
Nabendu Misra

ZMaxMsu
Posts: 1
Joined: Sat 25 Oct 2008 10:54

Post by ZMaxMsu » Sat 25 Oct 2008 11:05

so, i have the same problem. OS is windows xp sp3.
i try to connect to database from visual studio and see the same exception.
In last message i can read about solving this problem on windows server 2003..but nothing about xp...
can anybody help me in this situation?

Dimon
Devart Team
Posts: 2885
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Tue 28 Oct 2008 11:27

This problem might occur by some causes.
If you have a large number of client connection attempts, then in order to solve the problem, use the regedit.exe utility to add a new DWORD value named SynAttackProtect to the registry key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\ with value data of 00000000.
Also this problem might occur when SQLServer uses SSL encryption. In this case you can see this link: http://support.microsoft.com/kb/919710

Post Reply