Reply
Explorer
Posts: 17
Registered: ‎06-13-2016

JDBC driver socket timeout is not working

Hi,

 

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_2.5.24.1043 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.

 

Thanks,

Mani

Posts: 642
Topics: 3
Kudos: 121
Solutions: 67
Registered: ‎08-16-2016

Re: JDBC driver socket timeout is not working

Have you looked at the idle query timeout setting in Impala itself? There is the session level equivalent of QUERY_TIMEOUT_S that you can try from within your JDBC connection.

https://www.cloudera.com/documentation/enterprise/5-7-x/topics/impala_timeouts.html
Highlighted
Explorer
Posts: 17
Registered: ‎06-13-2016

Re: JDBC driver socket timeout is not working

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.