distal-attribute
distal-attribute
distal-attribute
distal-attribute

Keep Alive

User, date Message
Written by HostYou
4 years ago
Category: Feature discussion
3 posts since Tue, 07 Sep 10
Hello

Is it possible to send null packets (keepalive packets) to keep a session active? It would be nice if the seconds between the packets could be configured.

Tnx
Written by ansgar
4 years ago
4940 posts since Fri, 07 Apr 06
This was done in some old release but in fact it's not required at all as HeidiSQL automatically reconnects on demand.

You can, however, increase the servers variable "wait_timeout" via HeidiSQL > Host > Variables, to avoid being disconnected for a longer time.
Written by HostYou
4 years ago
3 posts since Tue, 07 Sep 10
Our firewall is the one disconnecting the idle sessions, not the MySQL server, as our mysql-server's timeouts are set to 8 hours.

I'm working with HeidiSQL every day. I like how the program evolved throughout versions 3 to 5, but i've always missed this feature.

I understand you're not going to implement the feature again, certainly when you dropped it earlier, but are there some workarounds?
Written by ansgar
4 years ago
4940 posts since Fri, 07 Apr 06
With a working reconnection logic, why would you ever want to keep your connection alive, for what purpose?

Also, you should keep in mind that your firewall and/or the MySQL server disconnects you for a specific reason, which is: nothing to do for more than x seconds. Sending keep-alives seems to me like disabling a good feature.
Written by HostYou
4 years ago
3 posts since Tue, 07 Sep 10
Yes, I know exactly what you mean, but when my session is closed, it takes at least 20 seconds to reconnect again. I don't have this timeout when keepalives are present.
Written by ansgar
4 years ago
4940 posts since Fri, 07 Apr 06
20 seconds? You should find out why that takes so long.
Written by muzza4
4 years ago
51 posts since Mon, 04 Dec 06
Hi HostYou and Anse

I have the same problem as HostYou. After about 20 minutes with no use Heidi is unresponsive (not always but usually) for about 30 seconds. It's pretty frustrating.

I have raised this issue previously, and pointed out that the problem was present, was fixed in heidisql.r2688, and reappeared shortly after. I've looked back through the history and I suspect it was r2629 that fixed it.

I often use load version r2688 to avoid this very problem - I can assure you it doesn't occur with it.

Regards
Muzza
Written by ansgar
4 years ago
4940 posts since Fri, 07 Apr 06
The slowness fixed in both similar changes (r2629 and r2688) is still fixed - and was caused by loading table names from the current database into an internal list. Should not be a problem in the newer builds as this was not changed afterwards.

However, this thread discusses some unusual wait interval when connecting to a MySQL server through some firewall.
Written by muzza4
4 years ago
51 posts since Mon, 04 Dec 06
Hi Anse

I have just tested version 2688 vs 3528 after connecting them to the same database and then leaving them for an hour. V2688 was immediately responsive, while V3528 took 25 seconds to start again.

Interesting the V2688 exe is 932Kb and V3528 is 4748Kb. Possibly this is a clue?

I presume this issue doesn't affect everyone, but it's annoying for those it does affect. If you wanted to debug in this area I'd be happy to assist.

Regards
Muzza
Written by ansgar
4 years ago
4940 posts since Fri, 07 Apr 06
Filesize has mainly grown due to not using UPX anymore. Should of course not be any problem, apart from traffic on my website.

I highly guess r2688 also takes 25 seconds for the first connect, does it? If so, it will of course be a problem of the connection itself, Firewall stuff, server reachability or something else - no debugging in Heidi required in that case.
Written by muzza4
4 years ago
51 posts since Mon, 04 Dec 06
Hi Anse

One version of HeidiSQL doesn't give me a problem, and the latest one does. On the face of it, it looks like a software issue not a server issue, since it's the same server and setup.

Anyway, decision to investigate is yours (my offer stands).

Thanks as always, for providing this software.

Regards
Muzza
Written by ansgar
4 years ago
4940 posts since Fri, 07 Apr 06
You didn't say if the first connect also takes 25 seconds, does it?
Written by muzza4
4 years ago
51 posts since Mon, 04 Dec 06
yep
Written by ansgar
4 years ago
4940 posts since Fri, 07 Apr 06
Ok... (btw I'm investigating all the time). Only I'm obviously blind. Is there some query you can see after having connected in the log panel which takes so long? Or is it the connection handshake itself?
Written by muzza4
4 years ago
51 posts since Mon, 04 Dec 06
Hi Anse

1. Leave HeidiSQL for 30 minutes or so
2. Connected: shows 00:44:00 or similar
3. Bottom right states "Idle"
4. Click a table
5. Bottom right states "Fetching Rows"
6. After 30 seconds or so the rows appear
7. Connected: shows 00:00:03

So I guess it's the connection handshake.

Thanks
Muzza
Written by ansgar
4 years ago
4940 posts since Fri, 07 Apr 06
Yes, sounds right. Only I'm not able to reproduce such slowness neither here in conjunction with 5 different server versions nor in my company, nor using SSH tunnel or SSL options. Makes no sense to look after some bug when it does not appear here. That's the reason why I keep thinking it has something to do with your connection to the server.
Written by muzza4
4 years ago
51 posts since Mon, 04 Dec 06
Hi Anse

I expect it is a connection issue too, it's just that one version avoids or solves my problem and one doesn't.

> Makes no sense to look after some bug when it does not appear here <

I'm in a similar business to you, and I appreciate the non-reproducibility issue. Hence my suggestion to assist debug.

No problem though.

Thanks
Muzza
Written by ansgar
4 years ago
4940 posts since Fri, 07 Apr 06
Did you use exactly the same libmysql.dll in both r2688 and the latest build?
Written by muzza4
4 years ago
51 posts since Mon, 04 Dec 06
Yes, I simply have an extra file in the HeidiSQL folder called heidisql.r2688 the fast one.exe
Written by ansgar
4 years ago
4940 posts since Fri, 07 Apr 06
Hm honestly I have no clue what's going on here. Is that libmysql.dll from the latest release installer (5.1)?
Written by muzza4
4 years ago
51 posts since Mon, 04 Dec 06
Hi Anse

My libmysql.dll wasn't the latest one (I hadn't installed for ages, just run the updates). My version was April 2009.

I have now installed and have a February 2010 version of libmysql.dll, and tested over the last few hours. The situation does not appear to have changed.

Regards
Muzza
Written by hantim
3 years ago
1 posts since Mon, 21 Feb 11
I'm not a fan of reviving dorment topics, but I have been a new user of HeidiSQL and I like it but this reconnection lag is the one and only annoying thing at the moment.
Looks to me that a keep alive feature could be helpful to some if not all.

Kind regards,

HanTim
Written by ansgar
3 years ago
4940 posts since Fri, 07 Apr 06
Don't you think the server should not receive anything as long as the user doesn't click anywhere? If you get a reconnect too often you could increase your "wait_timeout" variable:

SET @@wait_timeout := 28800


This is 8 hours, the default value on newer servers. Older servers had 20 minutes by default if I recall right.
Written by ansgar
2 years ago
4940 posts since Fri, 07 Apr 06
The latest HeidiSQL build now has an internal non-configurable keep-alive feature. You should update especially if your SSH tunnel gets disconnected often.
Written by werne
1 year ago
3 posts since Sun, 03 Feb 13
Hej Ansgar,
thank you so much for this feature. This was on the top of my (few) wishes. It makes it much more convenient to work.
Maybe you can make it a little configurable in one of the next version.
Tack!
 

Please login to leave a reply, or register at first.