FetchAll=False & Lost connection again
Yes, we reproduced it. This is a restriction of the LocalFailover functionality. Failover does not occur and the OnConnectionLost event is not raised if there are underfetched datasets withing the connection. So this is designed behaviour when Failover does not occur on connection lost when fetching data in FetchAll=False mode.
-
eduardosic
- Posts: 387
- Joined: Fri 18 Nov 2005 00:26
- Location: Brazil
ok..
ok,, the solution for GuzunNicolae is increase a value of MySQL Variables..Antaeus wrote:Yes, we reproduced it. This is a restriction of the LocalFailover functionality. Failover does not occur and the OnConnectionLost event is not raised if there are underfetched datasets withing the connection. So this is designed behaviour when Failover does not occur on connection lost when fetching data in FetchAll=False mode.
or put a TTime calling TMyConnection.Ping;
Antaeus, exists a possibilit to create in TmyConnection.Options 2 new properties:
AutoPing = True/False
AutoPingInterval = Integer
to call ping automatically and reactive a connection?
best regard's, Eduardo.
-
eduardosic
- Posts: 387
- Joined: Fri 18 Nov 2005 00:26
- Location: Brazil
ok..
Currently i use the DisconnectedModel/LocalFailOver and I do not have more problem with Lostconnection. the ideia of the property and for who still does not use the DisconnectedModel/LocalFailover.Antaeus wrote:We will think about these properties. Probably we will add them in the next MyDAC builds\versions, but it is hardly to happen in the near time.
Meanwhile you can implement a procedure that pings the MySQL server by yourself.
thank's for MyDAC, the best Data Access for MySQL.
-
GuzunNicolae
- Posts: 78
- Joined: Wed 17 Jan 2007 14:16
Ok. This is the problem that the OnConnectionLost is not triggered. But why it is looses connection? With FetchAll = True everything works perfect.Antaeus wrote:Yes, we reproduced it. This is a restriction of the LocalFailover functionality. Failover does not occur and the OnConnectionLost event is not raised if there are underfetched datasets withing the connection. So this is designed behaviour when Failover does not occur on connection lost when fetching data in FetchAll=False mode.
Thank you eduardosic for your help.eduardosic wrote: ok,, the solution for GuzunNicolae is increase a value of MySQL Variables..
or put a TTime calling TMyConnection.Ping;
But the idea is that the main connection does not stay idle for more than 2-3 sec. And it closes exactly at the same time the new data are to be fetched.
Only the additional connection (created to fetch data as I guess) is closed. And for sure pinging from the main connection will not help. We don't have any access to the second connection.
-
eduardosic
- Posts: 387
- Joined: Fri 18 Nov 2005 00:26
- Location: Brazil
lostconnection..
LostConnection to happen for some reasons:GuzunNicolae wrote:Ok. This is the problem that the OnConnectionLost is not triggered. But why it is looses connection? With FetchAll = True everything works perfect.Antaeus wrote:Yes, we reproduced it. This is a restriction of the LocalFailover functionality. Failover does not occur and the OnConnectionLost event is not raised if there are underfetched datasets withing the connection. So this is designed behaviour when Failover does not occur on connection lost when fetching data in FetchAll=False mode.
Thank you eduardosic for your help.eduardosic wrote: ok,, the solution for GuzunNicolae is increase a value of MySQL Variables..
or put a TTime calling TMyConnection.Ping;
But the idea is that the main connection does not stay idle for more than 2-3 sec. And it closes exactly at the same time the new data are to be fetched.
Only the additional connection (created to fetch data as I guess) is closed. And for sure pinging from the main connection will not help. We don't have any access to the second connection.
1 - Unstable network
2 - timeout of all variables below
try to increase the value
connect_timeout | 5 |
| delayed_insert_timeout | 300 |
| innodb_lock_wait_timeout | 50 |
| interactive_timeout | 28800 |
| net_read_timeout | 30 |
| net_write_timeout | 60 |
| slave_net_timeout | 3600 |
| sync_replication_timeout | 10 |
| table_lock_wait_timeout | 50 |
| wait_timeout | 28800
-
GuzunNicolae
- Posts: 78
- Joined: Wed 17 Jan 2007 14:16
Re: lostconnection..
I have finally could restart my mysql server.
So I have changed
net_read_timeout
net_write_timeout
to some bigger values and this solved the problem.
Thank you very much
So I have changed
net_read_timeout
net_write_timeout
to some bigger values and this solved the problem.
Thank you very much
-
eduardosic
- Posts: 387
- Joined: Fri 18 Nov 2005 00:26
- Location: Brazil
Re: lostconnection..
Very Good!!!GuzunNicolae wrote:I have finally could restart my mysql server.
So I have changed
net_read_timeout
net_write_timeout
to some bigger values and this solved the problem.
Thank you very much