NGINX 1.6.2,ES 1.4, Kibana 4b2 (from ES download site), Oracle JDK1.8, Centos 5
simple upstream config, Nginx proxies 80 to kibana running on 5601
Users report slow or white page, when loading kibana, there seems to be some javascript errors causing this delay as reported by firefox console.
mutating the [[Prototype]] of an object will cause your code to run very slowly; instead create the object with the correct initial [[Prototype]] value using Object.create index.js:100076
window.controllers is deprecated. Do not use it for UA detection. nsHeaderInfo.js:412
the kibana discover page might render after 60 seconds, the running slowly part seems to be very true in this configuration.
have also tried on haproxy with the same behaviour
What version of firefox is this on? I regularly test with a node based proxy and haven't seen this behavior. While we can't help you debug your proxy, it might be helpful for others if you posted your nginx and haproxy configurations here.
Something to note here is that the index.js file is 4.8 megabytes, and if your users are trying to load that on a slow connection, over a long distance, or over some sort of wireless connection, that could be the issue.
The only problem I could imagine nginx causing is if it's setup to throttle downloads. Maybe using limit_rate config.
Firefox version is 33.1.1, but this also happens on latest chrome 33.1.1
Here is how the nginx setup looks.
upstream kibana
{
server 192.168.0.1:5601; #kibana1
server 192.168.0.2:5601; #kibana2
}
server {
listen 80;
server_name localhost;
location / {
proxy_pass http://kibana;
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
proxy_redirect off;
proxy_buffering off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
The bandwith is not an issue, data center is located in the same country and the response is the same if you in the country or not and trust me when i say there is no network issue.
Kibana gives the 200 OK to all the response this seems purely JS related in rendering the intial kibana UI, after that its smooth as butter! PS great job on Kibana 4 loving it, running smooth on 150 million documents in ES.
Well @spenceralger you gave me the hint i needed this behavior is repeatable in chrome using icognito mode. the 4mb javascript file is indeed the problem its not like its super huge but anyhow applying gzip on javascript files i was able to squeeze it down to 1.3 mb and initial page load time <10 seconds as oppossed > 40 secs
i just changed main nginx.conf to have the following settings
gzip on;
gzip_proxied any;
gzip_types text/plain application/javascript application/x-javascript text/javascript text/xml text/css;
I've tested this with nginx and I'm still unable to replicate this. Given that you've tracked this down to nginx configuration and what seems to be unsatisfactory network or proxy performance, I'm going to close this. Thanks!
I'm still facing this issue with kibana 4b3 and using nginx as a proxy.
The index.js file is 4.8MB, The idea of gzipping it took it down to 1.2MB, but still it takes some time to download a 1.2MB on my internet connection.
I've attached a screenshot of the request from chrome console.

Thank you.
having same issue as well
hitting proxied servers directly does not haev any issues but nginx slows it down for no reason
Most helpful comment
Well @spenceralger you gave me the hint i needed this behavior is repeatable in chrome using icognito mode. the 4mb javascript file is indeed the problem its not like its super huge but anyhow applying gzip on javascript files i was able to squeeze it down to 1.3 mb and initial page load time <10 seconds as oppossed > 40 secs
i just changed main nginx.conf to have the following settings