Hue performs very slowly

Hue performs very slowly. The webui after login taking several (often >2 or more) minutes to load and running query mostly takes even longer to start often showing red exclamation icon (The query is taking hanging or taking longer than usual) . Clicking on different options in HUE is also very slow, taking minutes to load Hive.

Most of the the endusers (and superusers/admins like us) also have this issue during the day. We are unable to identify the bottle neck and need assistance.

One observation were made when this happens that the requests.active value under desktop/metrics goes > 12 or 15, it starts to slow down and higher the number, slower it becomes often just blank page.

With above behaviour we don’t have any external LB infront of Hue though.

But have read the documents/articles suggesting that having a LB infront can improve the performance dramatically. So we are have stood up one nginx server as LB and for two hue servers (in an isolated area to do internal tests), but still even with nginx LB infront the login appears a bit slow.

Hue performs very slowly. The webui after login taking several (often >2 or more) minutes to load and running query mostly takes even longer to start often showing red exclamation icon (The query is taking hanging or taking longer than usual) . Clicking on different options in HUE is also very slow, taking minutes to load Hive.

Most of the the endusers (and superusers/admins like us) also have this issue during the day. We are unable to identify the bottle neck and need assistance.

One observation were made when this happens that the requests.active value under desktop/metrics goes > 12 or 15, it starts to slow down and higher the number, slower it becomes often just blank page.

With above behaviour we don’t have any external LB infront of Hue though.
But have read the documents/articles suggesting that having a LB infront can improve the performance dramatically. So we are have stood up one nginx server as LB and for two hue servers (in an isolated area to do internal tests), but still even with nginx LB infront the login appears a bit slow.

Below are our nginx config -

++++++++++++++++++++++
# /etc/nginx/nginx.conf
user nginx;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
worker_processes "2";

events {
   worker_connections 1024;
   multi_accept off;
}

http {
       include /etc/nginx/mime.types;
       default_type application/octet-stream;
       server_names_hash_bucket_size 64;
       client_max_body_size 64m;
       log_format main '$remote_addr - $remote_user [$time_local] "$request" '
       '$status $body_bytes_sent "$http_referer" '
       '"$http_user_agent" "$http_x_forwarded_for"';
       access_log /var/log/nginx/access.log main buffer=16k flush=2m;
       sendfile on;
       tcp_nopush on;
       tcp_nodelay on;
       keepalive_timeout 65;
       keepalive_requests 100;
       server_tokens on;
       # gzip on;

upstream hue_servers {
       ip_hash;
       server $FQDN_HUESERVER02:443 max_fails=3 fail_timeout=5s;
       server $FQDN_HUESERVER03:443 max_fails=3 fail_timeout=5s;
   }
include /etc/nginx/conf.d/*.conf;
}
++++++++++++++++++++++

and another at /etc/nginx/conf.d/hue.conf

++++++++++++++++++++++
# /etc/nginx/conf.d/hue.conf
server {

       listen $FQDN_NGINX_SERVER:443 ssl;
       server_name $FQDN_NGINX_SERVER;

       index index.html index.htm;

location / {
       proxy_set_header Host $host;
       proxy_set_header X-Real-IP $remote_addr;
       proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
       proxy_set_header X-Forwarded-Proto $scheme;
       proxy_pass https://hue_servers;
}

       # ssl
       ssl_certificate /etc/nginx/certs/nginx.crt;
       ssl_certificate_key /etc/nginx/certs/nginx.key;

       # errors
       error_page 500 502 503 504 /50x.html;
       location = /50x.html {
              root /usr/share/nginx/html;
       }

}
++++++++++++++++++++++

We are trying to find the possible causes of this slow HUE behaviour and link between the slowness and requests.active as the running queries from CLI works and returns in normal time.

Also are there any recommendations anyone can provide for above nginx LB config?