Ads were blocked - no problem. But keep in mind that developing HeidiSQL, user support and hosting takes time and money. You may want to send a donation instead.

Query Timeout always disabled

ArnorBld's profile image ArnorBld posted 4 years ago in Creating a connection Permalink
Hi guys,

With a new host I'm getting a timeout every 15 seconds of inactivity on a mySQL database. They suggested change the query timeout, but that entry is ALWAYS disabled. What do I have to do to enable it?

Best regards,
Arnor Baldvinsson Icetips Alta LLC
kalvaro's profile image kalvaro posted 4 years ago Permalink
You could hardly be more vague but, assuming you want to change wait_timeout and/or interactive_timeout from HeidiSQL, you shouldn't have any problem since they're dynamic variables.

What happens when you go to "Host-> Variables", double click on the value, set the new figure and click "OK"?
kalvaro's profile image kalvaro posted 4 years ago Permalink
BTW, to make the change persist you could use the "Startup script" feature. Please find it in the session manager ("Advanced tab"). You can obtain the SQL command when you change the value from the GUI, e.g.:

SET @@session.interactive_timeout = 28800;
Ads were blocked - no problem. But keep in mind that developing HeidiSQL, user support and hosting takes time and money. You may want to send a donation instead.
ArnorBld's profile image ArnorBld posted 4 years ago Permalink
Hi Kalvaro,

Sorry for not being clear on this. I have been using HeidiSQL for many years with multiple hosting companies and never had this problem before.

When I connect to the db using HeidiSQL, I get:

/* Connection to xxx.xxx.xxx.xxx closed at 2015-06-03 01:22:02 */

after 15 seconds of inactivity. The hosting company's (hostgator.com) technical support suggested - based on an older post on this forum - to change the "Query Timeout" Like I said that entry is ALWAYS disabled:

http://screencast.com/t/9kzuKOtKl

>What happens when you go to "Host-> Variables", double click on the value, set the new figure and click "OK"?

Hmm... You mean in HeidiSQL or something else? I don't find any menu or anything there that navigates to "Host -> Variables"

Using the SET @@session, made no difference. In the message list at the bottom I get:

SET @@session.interactive_timeout = 28800;
/* Connection to xxx.xxx.xxx.xxx closed at 2015-06-03 01:32:11 */

(see: http://screencast.com/t/2PKqMJllM)

15 seconds from the SET command executed to the connection was closed.

The problem is that once the connection closes the datagrid is disabled, see:

http://screencast.com/t/7OUr1lsgj

So I'm kind of dead in the water trying to use HeidiSQL with this host and changing hosts is not an option.

Best regards,
Arnor
ansgar's profile image ansgar posted 4 years ago Permalink
That query timeout was introduced for MSSQL servers, as the underlying TAdoConnection object has a CommandTimeout property, to which the timeout setting is passed.

For MySQL, HeidiSQL does not provide that setting. But as kalvaro already explained, there is the interactive_timeout variable, and HeidiSQL could set this variable at startup using the same query timeout setting from the "Advanced" tab.

Btw: yes, HeidiSQL has a "Host" tab, and a subtab called "Variables". Watch out for the first main tab.

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