Impala query fails with an invalid query handle error

You get the "Invalid query handle" error while running Impala queries from the Hue web interface when connection between Thrift and the Hue Load Balancer times out. This is governed by the server_conn_timeout property.

The default value of the server_conn_timeout property is 30 minutes. You can increase the timeout value by updating the Hue configuration through Cloudera Manager as follows:

  1. Log into Cloudera Manager as an Administrator.
  2. Go to Clusters > $Hue service > Configuration > Hue Service Advanced Configuration Snippet (Safety Valve) for hue_safety_valve.ini.
  3. Increase the value of the server_conn_timeout property within the Impala section as follows:
    [impala]
       server_host=[***SERVER-HOST***]
       server_port=[***PORT***]
       server_conn_timeout=[***TIMEOUT-IN-SECONDS***]

    You can increase the value of the server_conn_timeout property to 2 hours (7200 seconds).

  4. Click Save Changes.
  5. Restart the Hue service.

You should be able to run Impala queries from the Hue web interface successfully.