Page 1 of 1

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

Posted: Fri 22 Jan 2016 09:00
by na9tech
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

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

Posted: Tue 02 Feb 2016 09:05
by azyk
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 .

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

Posted: Thu 01 Nov 2018 16:55
by confundido
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.

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

Posted: Wed 26 Jun 2019 14:16
by Stellar
Are you still experiencing the issue with server connection when executing long queries on the server?