We are seeing very odd behavior when trying to query ES via Kibana or directly (using Postman). If the timezone is set to UTC or a timezone that is UTC+3 and above/UTC-3 and below, queries return fast, while queries ran with UTC+1/UTC+2/UTC-1/UTC-2 have poor performance and get timed out.
We see that when running the exact same query directly to ES with different time zones.
ES version 6.3.1
Thanks for the prompt reply.
Here it is (its a copied Kibana request) :
{"index":"2_newlogs*","ignore_unavailable":true,"timeout":3000000,"preference":1546442297305}
{"version":true,"size":500,"sort":[{"timestamp":{"order":"desc","unmapped_type":"boolean"}}],"_source":{"excludes":},"aggs":{"2":{"date_histogram":{"field":"timestamp","interval":"30m","time_zone":"Asia/Jerusalem","min_doc_count":1}}},"stored_fields":[""],"script_fields":{},"docvalue_fields":["timestamp"],"query":{"bool":{"must":[{"match_all":{}},{"range":{"timestamp":{"gte":1546356433787,"lte":1546442833788,"format":"epoch_millis"}}}],"filter":[],"should":[],"must_not":[]}},"highlight":{"pre_tags":["@kibana-highlighted-field@"],"post_tags":["@/kibana-highlighted-field@"],"fields":{"":{}},"fragment_size":2147483647}}
BTW, when we remove "time_zone":"Asia/Jerusalem" or the histogram query (or both) we get results.
And you can reproduce this by querying ES directly without kibana? When you get the result after it takes the long time, does it seem correct? Could you possibly execute hot_threads request while running this slow request directly against elasticsearch? It would be interesting to see where it spends this time.
Yes, it is reproduced directly against elasticsearch (using Postman for querying). Removing the time_zone from the date_histogram aggregation (or plainly using "UTC" as the value) eliminates the problem.
Yes, we are reproducing this with/without Kibana while changing the timezone to UTC works both in Kibana and directly. @iamredlus or @amnons can probably help with the hot_threads req
I've run a hot_threads request while the query was running. Around 10 seconds have passed from when I sent the query until the hot_threads has been sent. Query finally returned after 49.827 seconds.
Sent you the hot_threads pastebin in a DM (filtered in only the 6 nodes the index resides on).
Running the query with "UTC" - query returns within 1.220 seconds.
Running the query with "Etc/GMT+2" - query returns within 1.341 seconds.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.