Connection Keep-Alive feature
We are using lot of firewalls in our corporate LAN. Unfortunately this cause any socket connection to be lost after a given amount of inactivity.
Is there any way to setup a 'keep-alive' feature that will continuously perform a simple request like 'select 1' on the currently opened connections ?
If not, are there plans to develop this kind of feature ?
Thank you very much
Please sign in to leave a comment.
Hello Fabien,
What Database do you use? How does the error look like exactly? After what time does it disconnect? Thanks.
Hi Andrey
I'm using MonetDB, but it seems not related to the specific database I use. I'm experiencing that problem with all socket connections between my desktop PC and the server in our corporate LAN. After a period of inactivity, the socket connection is lost because the underneath firewall is very picky
There is no error appearing, simply when I perform a new query, the JDBC driver is throwing an exception (08:35:38 [08000] Software caused connection abort: recv failed)
When a recycle the connection, it is working fine again.
I can not say precisely the amount of time. It is around 30 minutes I think.
The keep-alive feature is something I already use with other java programs through an hikaricp pool (look at this thread discussing about how it is working http://stackoverflow.com/questions/3668506/efficient-sql-test-query-or-validation-query-that-will-work-across-all-or-most)
Apparently in JDBC4 there is a Connection.isValid() API which does exactly that. It would be a perfect solution if DataGrip could periodically call this API (with a setting in the connection properties dialog box for instance)
Thank you
Thanks
Thank you for the information. We will think how to better handle this. You may follow related issue for MySQL: https://youtrack.jetbrains.com/issue/DBE-569
Yes, please, this is a tiny but a very important feature to have. Annoying always to have to set up putty tunnel into a localhost port, with keepalive, to keep the connections alive. I'm using Oracle at the moment, but this is of course db independed.
Thanks.