cityindex-attic / logsearch

[unmaintained] A development environment for ELK
Apache License 2.0
24 stars 8 forks source link

Kibana users can unintentionally hose the elasticsearch nodes #247

Closed dpb587 closed 10 years ago

dpb587 commented 10 years ago

Seems like users can unintentionally (or intentionally) kill an elasticsearch node with complex queries or large date ranges. To workaround this, we should try auto-appending the timeout option for the elasticsearch searches.

For now, it seems easiest to simply do that with nginx query re-writing and appending a timeout to all requests. Something like the following should help:

rewrite ^(.*)$ $1?timeout=15s break;
dpb587 commented 10 years ago

@mrdavidlaing, have you been happy enough with the current 5s timeout for me to officially commit it here?

mrdavidlaing commented 10 years ago

@dpb587,

Yes, lets commit

        location ~ ^/[^\/\*]+/_search$ {
            rewrite ^(.*)$ $1?timeout=5s break;
            proxy_pass http://elasticsearch;
        }
mrdavidlaing commented 10 years ago

Lets increase this timeout to 15s

dpb587 commented 10 years ago

The comment probably should have been a new issue, given requirements changing and this being an already closed issue. Committed.