Squirrel sql client session timeout

天涯浪子 提交于 2019-11-30 17:24:43

You can keep the connection alive by doing the following:

On Aliases->Modify the Selected Alias (pencil icon)-> Properties-> Connection (tab)

Check Enable Keep-Alive

and enter a simple query, in PostgreSQL I use SELECT 1;, in Oracle should be something like SELECT 1 FROM dual;

Javatar

Solution for MySQL:

  • Right-click a connection alias and select "Modify alias"
  • Click "Properties" and select the "Driver properties" tab
  • Set the property "autoReconnect" to "TRUE"

If you're connecting to an Apache Derby db, use the following keep-alive test SQL:

VALUES 1

I faced the same problem with my local development machine. Since using the driver property "autoReconnect" is discouraged by SQuirreL, I looked for another alternative which fixes the root cause.

I have access to the /etc/mysql/my.cnf directory on my Linux VM, so I could tweak the variable wait_timeout. Previously, it was set to 600 (600 / 60 seconds per minute = 10 minutes). I then set it to 28800 which is the MariaDB default.

After restarting the MySQL server using service mysql restart, everything worked like a charm!

Uttam

Locate the the prefs.xml in the installation directory and change the default loginTimeout value to your desired value and you are done.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!