Page 1 of 1

Database autoconnect

PostPosted: Fri Apr 10, 2015 2:45 pm
by ominds
I know this was requested before. And that you thought it could create problems for transactions. But the main problem that causes this is the wait_timeout directive inside MySQL. It's the idle time between queries on the same connection before MySQL closes it.

One way to fix this is to do this query for the connection made by DBeaver for MySQL.

set wait_timeout = 900

Another fix is to simply auto-reconnect transparently. This could be off by default and per database connection (when creating/editing connection). So that a user setting it will know what he's doing. Since most projects don't use transactions, and even when they do, the wait_timeout is very unlikely to trigger inside a single transaction!

Re: Database autoconnect

PostPosted: Fri Apr 10, 2015 2:56 pm
by ominds
Found a solution for this. Go to the driver manager, and under connection properties, add this
interactiveClient, and set its value to true

This will direct MySQL to use the interactive_timeout rather than the wait_timeout, and will most likely prevent a timeout from happening since the interactive timeout is usually very high.