Remote MySql-Server, timeout problem when no action for more than 60 secs

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
pebogufi
Posts: 6
Joined: Sun 15 Jun 2008 11:02

Remote MySql-Server, timeout problem when no action for more than 60 secs

Post by pebogufi » Sun 15 Jun 2008 11:06

I get the message 'Lost connection to MySql server during query, Socket error on write, WSAGetLastError return 10053($2745)'

As workaround I installed a timer, making a select call in TUniQuery every 50 secs.
Any recommandation for better solution ?
Any settings on TUniConnection so be made ?
(I can't acces CrLab-help, see other thread)

eduardosic
Posts: 387
Joined: Fri 18 Nov 2005 00:26
Location: Brazil

Re: Remote MySql-Server, timeout problem when no action for more than 60 secs

Post by eduardosic » Mon 16 Jun 2008 01:51

pebogufi wrote:I get the message 'Lost connection to MySql server during query, Socket error on write, WSAGetLastError return 10053($2745)'

As workaround I installed a timer, making a select call in TUniQuery every 50 secs.
Any recommandation for better solution ?
Any settings on TUniConnection so be made ?
(I can't acces CrLab-help, see other thread)
In TUniConnection.Options set LocalFailOver = True

in event OnConnectionLost put the code

Code: Select all

   RetryMode := rmReconnectExecute;
add unit MemData in the uses

when possible see Unidac Help About LocalFailOver and DisconnectedModel.

problem solved. :D

thank's CoreLab for LocalFailOver and DisconnectedModel

pebogufi
Posts: 6
Joined: Sun 15 Jun 2008 11:02

Post by pebogufi » Mon 16 Jun 2008 15:48

thanks a lot, it works.
As soon as my help will work(I don't know how) I will look at it :-)

Post Reply