Had come across SocketTimeout option in jdbc driver and tried it out to see if helps in taking care of idle connections. It is not working as expected, even default value is not working. I am using ImpalaJDBC_126.96.36.1993 version (free) and using CDH 5.7.0.
Is anyone else using SocketTimeout option comes across this issue?
The reason for looking out this option is, had come across a situation, wherein client program waiting for so long to get the connection from impala, almost close to 2 hrs. No exception in logs, client etc but it keeps on waiting. During this moment, total front end connections in use didn't even reached 50% of the total front end connections (from cloudera manager graph). Restarting impalad's helped to recover this situation.
Hence, thought of exploring some connection timeout option as an attempt to see whether control comes out as soon as it reaches max threshold time while fetching the connections, instead of waiting indefinitely. While doing this, come across above socket timeout option and tried out as it was also an another requirement for me to clear idle connections.
I've explored idle query timeout and idle session out before itself and using in prod cluster as well. Those timeouts are not related to idle connections. Idle session timeout is taking care of only session, but still connection is established and being counted under active connections in use. On reading about SocketTimeout option in jdbc driver, it clearly said it will take care of idle connections. Hence tried it out, but doesn't seem to work. Most of users here, using sql workbench through jdbc driver keeps opening new tab for every new query and don't close their tab for the whole day. I assumed sockettimeout will solve this problem.