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

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
na9tech
Posts: 5
Joined: Fri 22 Jan 2016 08:57
Contact:

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

Post by na9tech » Fri 22 Jan 2016 09:00

Dear Sir/Mam
Hello
I am ALi Asghar developer manager of NanoTechnic Company.
We Have a database application that we write this application with delphi 7(sdac 3) and Sql2000 from 2004.
at the last years we update our Delphi cpmpiler to Delphi XE7(With Sdac 6.11.23 professional) and Sql Server 2008/2012
But Now he Have some critical error on our application.

I capture error with MadException error handler and this is result:

exception number : 1
exception class : EMSError
exception message : TCP Provider: An existing connection was forcibly closed by the remote host.
------------------------------------------------------------------------------------------------
exception number : 1
exception class : EMSError
exception message : TCP Provider: The semaphore timeout period has expired.
-------------------------------------------------------------------------------------------------
this errors occur suddenly and our application halt.

please help us to resolve this errors
thanks
Nano Technic Group

azyk
Devart Team
Posts: 1119
Joined: Fri 11 Apr 2014 11:47
Location: Alpha Centauri A

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

Post by azyk » Tue 02 Feb 2016 09:05

Please try to compose a small test sample that is correctly executed in SDAC 3, but leads to the specified errors in SDAC 6.11.23 . Include the scripts for creating the test tables and send the sample to andreyz*devart*com .

confundido
Posts: 1
Joined: Thu 01 Nov 2018 16:52

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

Post by confundido » Thu 01 Nov 2018 16:55

Ancient thread but apparently the fix is:

// override MySQL server timeout
MYSQL.MySqlCommand cmd = new MYSQL.MySqlCommand("set net_write_timeout=99999; set net_read_timeout=99999", srccon);
cmd.ExecuteNonQuery();

I'm running a long data migration query so this is an issue. Normal short queries, no problem.

Stellar
Devart Team
Posts: 310
Joined: Tue 03 Oct 2017 11:00

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

Post by Stellar » Wed 26 Jun 2019 14:16

Are you still experiencing the issue with server connection when executing long queries on the server?

Post Reply