Skip to main content
aakulov
aakulovAnswer
Platinum ⭐️
May 20, 2022

Looks like there are different types of AWS Load Balancers, and the one that can handle TCP sessions are either Network Load Balancer (NLB) or Classic Load Balancer. Which one are you using? I believe stickiness also works for NLB, but do validate with your AWS team.

 

The session timeout is two-fold:

  • LB session timeout. These are settings inside of the load balancer, nothing to do with Impala itself. The recommendation is to set this timeout to 12 hours, 6 hours at a minimum for both client and server timeouts.
  • Hue session timeout (idle_session_timeout). This is how long Hue will keep the connection to Impala alive. Default may be 15 minutes. If no queries run in this time amount of time, and then you run a new query, you'll get this error "Results have expired". Hue will need to start a new session. Also if your query takes longer than idle_session_timeout, then you'll definitely need to increase the timeout setting. 1 hour timeout may be appropriate here.

 

Regards,

Alex

 

 

6 replies

aakulov
Platinum ⭐️
Platinum ⭐️
May 20, 2022

Hi @yagoaparecidoti ,

 

If you have Impala daemons that are load-balanced (LB), then there is a configuration that needs to be applied on the LB, related to source IP persistance. There is a Knowledge Base article about this: https://community.cloudera.com/t5/Customer/Load-balancing-between-Hue-and-Impala/ta-p/73364

 

If there is no LB at play here, then has this issue been ongoing or just started to pop up recently? What changed on the cluster recently?

 

 

Regards,

Alex

Translate
yagoaparecidoti
Gold ⭐️
May 20, 2022

hi @aakulov 

 

the cluster is on AWS and the AWS LB is being used on ports 21050 of the impala daemon, in which case this LB may be having this problem?

 

sould it be that in this LB we can also change it to "source"?

 

Translate
aakulov
Platinum ⭐️
Platinum ⭐️
May 20, 2022

That's right, you'll need to look into how to setup AWS LB to have sticky sessions, which is not enabled by default. Also, please look into tuning the session timeout to a high value (long enough for Impala to finish the query and send the results back to Hue)

 

Reference: https://docs.aws.amazon.com/elasticloadbalancing/latest/application/sticky-sessions.html

 

 

Kind regards,

Alex Akulov

Translate
yagoaparecidoti
Gold ⭐️
May 20, 2022

LB AWS sticky sessions settings is for LB HTTP/HTTPS only

 

in this case the LB we are using is TCP on ports 21000 and 21050

 

the session timeout you say in the impala service, right?

 

would be the "idle_query_timeout" and "idle_session_timeout" options, right?

Translate
aakulov
Platinum ⭐️
aakulovAnswer
Platinum ⭐️
May 20, 2022

Looks like there are different types of AWS Load Balancers, and the one that can handle TCP sessions are either Network Load Balancer (NLB) or Classic Load Balancer. Which one are you using? I believe stickiness also works for NLB, but do validate with your AWS team.

 

The session timeout is two-fold:

  • LB session timeout. These are settings inside of the load balancer, nothing to do with Impala itself. The recommendation is to set this timeout to 12 hours, 6 hours at a minimum for both client and server timeouts.
  • Hue session timeout (idle_session_timeout). This is how long Hue will keep the connection to Impala alive. Default may be 15 minutes. If no queries run in this time amount of time, and then you run a new query, you'll get this error "Results have expired". Hue will need to start a new session. Also if your query takes longer than idle_session_timeout, then you'll definitely need to increase the timeout setting. 1 hour timeout may be appropriate here.

 

Regards,

Alex

 

 

Translate
DianaTorres
Community Manager
Community Manager
May 23, 2022

@yagoaparecidoti Has the reply helped resolve your issue? If so, please mark the appropriate reply as the solution, as it will make it easier for others to find the answer in the future. Thanks!

Translate
Regards, Diana Torres, Senior Community Moderator