Community

Running Looker behind a proxy server or load balancer

There are a few issues that can be caused by load balancers.

First, if the timeout is too short on the load balancer, Looker may generate a gateway timeout error. This error occurs in the javascript and manifests in the Looker app as a generic “Something Went Wrong” error. The only way to see the timeout error is with the developer / javascript console, where you will see a gateway timeout error on one of the JS calls.

Second, the headers may get messed up by the load balancer. Internally, Looker uses the following settings on our proxy server to avoid this issue:

proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Accept-Encoding "";
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

# Uncomment if behind ELB
#real_ip_header X-Forwarded-For;
#set_real_ip_from 10.0.0.0/8;
#set_real_ip_from 172.16.0.0/12;
#set_real_ip_from 192.168.0.0/16;

proxy_set_header X-Forwarded-Proto https;
1 Like

To expand on this, if your browser loses connection to the web server (Looker), Looker will actively kill the query that you were running. This is to minimize load on the database, e.g. make sure that if a user starts a query, loses interest (closes the tab / browser), they are not still consuming database resources.

Many proxy settings have a default timeout (e.g. 60 seconds) that will result in any queries that take longer than the timeout period getting killed.