SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
If SQL Editor automatically disconnect from the server

 
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant View previous topic
View next topic
If SQL Editor automatically disconnect from the server
Author Message
pfg1114



Joined: 30 Jun 2021
Posts: 29
Country: China

Post If SQL Editor automatically disconnect from the server Reply with quote
If SQL Editor is not operated for a period of time, it will automatically disconnect from the server (MySql8).

How to set so that the connection with the server will not be automatically disconnected?

My server interactive_timeout is set to 28800. But the problem still exists. But there is no problem connecting to the local server. Is it the SQL Editor client type (defined by the connection option CLIENT_INTERACTIVE of mysql_real_connect())?

Thank you!



Thu Jul 08, 2021 4:39 am View user's profile Send private message Send e-mail
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7833

Post Reply with quote
Idle TCP connections are terminated from the network and server side. SQL Editor in this case is a victim, not a cause of the disconnect. When this happens, if you press F5 second time, or other key you use to run the code, the editor will try to reconnect to the server with the existing settings and resend active query to the database server. Just press the same key again.
Thu Jul 08, 2021 9:38 am View user's profile Send private message
pfg1114



Joined: 30 Jun 2021
Posts: 29
Country: China

Post If SQL Editor automatically disconnect from the server Reply with quote
Datagrip has the option of "Run keep-alive query each xx sec", which ensures that the connection will not be disconnected. Excuse me: Does SQL Editor have this related option? Thank you!



Fri Jul 09, 2021 4:12 am View user's profile Send private message Send e-mail
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7833

Post Reply with quote
SQL Editor is a multi-database tool, each tab is independent
and opens iseparate connection. You can try using session monitor or performance dashboard which will query database every minute or so based on configured settings, but it's unlikely to help you with editor connections. It's better to fix the root cause of the issue with idle connections terminated on the network or server side too quickly.
Fri Jul 09, 2021 8:48 am View user's profile Send private message
pfg1114



Joined: 30 Jun 2021
Posts: 29
Country: China

Post Reply with quote
Datagrip is also a multi-database tool, but the problem has been solved.
Tue Jul 13, 2021 5:05 am View user's profile Send private message Send e-mail
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7833

Post Reply with quote
Thank you for the status update. Can you share with us how you resolved it?


Last edited by SysOp on Wed Jul 14, 2021 5:53 pm; edited 1 time in total
Tue Jul 13, 2021 8:47 am View user's profile Send private message
pfg1114



Joined: 30 Jun 2021
Posts: 29
Country: China

Post Reply with quote
Add "Keepalive=60;" to the connection string!


SQL Editor theme colors When Dark1 is selected, there will be flickering when switching tab. If default is selected, the switching of tab will be smoother. How can I solve this problem? Thank you!
Tue Jul 13, 2021 8:53 pm View user's profile Send private message Send e-mail
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.