Squirrel sql client session timeout

2019-02-16 06:47发布

It is not related to whatever version it is, just working to find out how to change (of course increase) session timeout value of Squirrel Sql Client. Because I really get bored of getting kind of exception "Last packet sent to the server was .. ago"

Any help would be appreciated.

4条回答
Explosion°爆炸
2楼-- · 2019-02-16 07:20

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

VALUES 1
查看更多
爷的心禁止访问
3楼-- · 2019-02-16 07:21

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.

Feature is discouraged.

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!

查看更多
你好瞎i
4楼-- · 2019-02-16 07:24

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;

查看更多
来,给爷笑一个
5楼-- · 2019-02-16 07:26

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"
查看更多
登录 后发表回答