Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] /api/kibana/suggestions/values/{index} endpoint causes elasticsearch cpu spikes #58787

Closed
cpmoore opened this issue Feb 27, 2020 · 2 comments
Labels
bug Fixes for quality problems that affect the customer experience Feature:Filters

Comments

@cpmoore
Copy link

cpmoore commented Feb 27, 2020

Kibana version: 7.6.0
Elasticsearch version: 7.6.0
Server OS version: Red Hat 7.7
Browser version: Chrome 78.0.3904.70
Browser OS version: Windows 7
Original install method: RPM from Yum repo

Ever since upgrading to 7.6.0 i've been noticing extreme cpu spikes on my cluster. They seem to happen whenever a new query is run in kibana, the same query can be run again and the spike doesn't occur again. My guess is because something is cached after the initial request.

It seems to be the /api/kibana/suggestions/values/{index} call that is the culprit.
The spike starts to occur as soon as the user starts typing in the search bar. Then each key press cancels the previous request and sends a new one, however it doesn't appear the queries are cancelled on the elasticsearch side and cpu climbs to 100%.

For instance, this following request causes the cpu to spike to around 40%

 curl --user cpmoore -H 'kbn-version: 7.6.0' -X POST -H 'Content-Type:application/json' 'https://kibana.elk.omf.cloud/api/kibana/suggestions/values/filebeat-prod-*' --data-binary '{"query":"datapower","field":"service.group","boolFilter":[]}'

The very last spike is this request, the others are my troubleshooting (trying to determine if this was the exact request causing the spikes). The eswk* hosts are the data nodes.
image

We have a relatively large cluster as you can tell from the below screenshot
image

I know there were some field filtering changes in 7.6.0, as @simianhacker has already rolled back one in a PR.
I was wondering if this could be caused by some changes to the suggestions endpoint.

@TinaHeiligers TinaHeiligers added bug Fixes for quality problems that affect the customer experience Feature:Filters Team:AppArch labels Feb 28, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app-arch (Team:AppArch)

@lizozom
Copy link
Contributor

lizozom commented Mar 3, 2020

Fixed by #58749 in 6.7.1

@lizozom lizozom closed this as completed Mar 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:Filters
Projects
None yet
Development

No branches or pull requests

4 participants