This is the documentation for Cloudera Impala 2.0.x.
Documentation for other versions is available at Cloudera.com.

Setting Timeout Periods for Daemons, Queries, and Sessions

Depending on how busy your CDH cluster is, you might increase or decrease various timeout values.

Increasing the Statestore Timeout

If you have an extensive Impala schema, for example with hundreds of databases, tens of thousands of tables, and so on, you might encounter timeout errors during startup as the Impala catalog service broadcasts metadata to all the Impala nodes using the statestore service. To avoid such timeout errors on startup, increase the statestore timeout value from its default of 10 seconds. Specify the timeout value using the -statestore_subscriber_timeout_seconds option for the statestore service, using the configuration instructions in Modifying Impala Startup Options. The symptom of this problem is messages in the impalad log such as:

Connection with state-store lost
Trying to re-register with state-store

Setting the Idle Query and Idle Session Timeouts for impalad

To keep long-running queries or idle sessions from tying up cluster resources, you can set timeout intervals for both individual queries, and entire sessions.

  Note: The timeout clock for queries and sessions only starts ticking when the query or session is idle.

For queries, this means the query has results ready but is waiting for a client to fetch the data. A query can run for an arbitrary time without triggering a timeout, because the query is computing results rather than sitting idle waiting for the results to be fetched. The timeout period is intended to prevent unclosed queries from consuming resources and taking up slots in the admission count of running queries, potentially preventing other queries from starting.

For sessions, this means that no query has been submitted for some period of time.

Specify the following startup options for the impalad daemon:

  • The --idle_query_timeout option specifies the time in seconds after which an idle query is cancelled. This could be a query whose results were all fetched but was never closed, or one whose results were partially fetched and then the client program stopped requesting further results. This condition is most likely to occur in a client program using the JDBC or ODBC interfaces, rather than in the interactive impala-shell interpreter. Once the query is cancelled, the client program cannot retrieve any further results.
  • The --idle_session_timeout option specifies the time in seconds after which an idle session is expired. A session is idle when no activity is occurring for any of the queries in that session, and the session has not started any new queries. Once a session is expired, you cannot issue any new query requests to it. The session remains open, but the only operation you can perform is to close it. The default value of 0 means that sessions never expire.

For instructions on changing impalad startup options, see Modifying Impala Startup Options.

You can reduce the idle query timeout by using the QUERY_TIMEOUT_S query option. Any value specified for the --idle_query_timeout startup option serves as an upper limit for the QUERY_TIMEOUT_S query option. See QUERY_TIMEOUT_S for details.