I am having an issue where my Kibana instance randomly will take long times to carry out actions, sometimes even fetching the list of spaces can take 20s. I have a 3 node ES cluster, and a single node hosting Kibana. I tried an entirely separate Kibana instance but it had no impact on the behavior of kibana. I went to the developer tools section of kibana and wrote a simple query to hit ES with and then timed it and sometimes it will complete in 20-50ms and other times it will take 9-20s. I then try that same query from curl against my ES cluster and I see that ES always completes the query in sub 100ms. I have tried altering the configuration of Kibana to point at each node in ES individually to see if it was a particular node that was causing the issue and that had no impact.
I did see this pattern in the metrics for kibana:
It seems suspicious to me that the memory seems to have that pattern. Anyone have any ideas on how I can resolve this?