提问要多花一点心思哦

highlight 返回来的title 不全 看截图

Elasticsearchqq731761942 回复了问题 • 2 人关注 • 2 个回复 • 2851 次浏览 • 2018-06-14 13:16 • 来自相关话题

elaseticsearch update all能实现么

Elasticsearchstrglee 回复了问题 • 2 人关注 • 1 个回复 • 2981 次浏览 • 2018-06-14 11:40 • 来自相关话题

社区日报 第302期 (2018-06-14)

社区日报白衬衣 发表了文章 • 0 个评论 • 1526 次浏览 • 2018-06-14 10:19 • 来自相关话题

  1. Elastic Stack 6.3重磅发布。
    [http://t.cn/RBXttvr](http://t.cn/RBXttvr)

  2. Kubernetes EFK 实战。
    [http://t.cn/RBiiwHR](http://t.cn/RBiiwHR)
    [http://t.cn/RBiiGFp](http://t.cn/RBiiGFp)

  3. 译文:kafka学习之路。
    [http://t.cn/RXGeTLz](http://t.cn/RXGeTLz)

  4. Google Pub / Sub与ELK Stack集成
    [http://t.cn/RBii6rQ](http://t.cn/RBii6rQ)

    活动预告

  5. 6月30日南京meetup参会报名中
    [https://elasticsearch.cn/m/article/647](https://elasticsearch.cn/m/article/647)

  6. 7月21日上海meetup演讲申请中
    [https://elasticsearch.cn/m/article/655](https://elasticsearch.cn/m/article/655)

ES5.3聚合内存溢出bug

Elasticsearchyayg2008 发表了文章 • 1 个评论 • 4681 次浏览 • 2018-06-13 20:48 • 来自相关话题

有以下DSL
json<br /> {<br /> "size" : 0,<br /> "query" : { },<br /> "_source" : false,<br /> "aggregations" : {<br /> "aggData" : {<br /> "terms" : {<br /> "field" : "url",<br /> "size" : 200,<br /> "min_doc_count" : 1,<br /> "shard_min_doc_count" : 0,<br /> "show_term_doc_count_error" : false,<br /> "order" : [<br /> {<br /> "PV" : "desc"<br /> }<br /> ]<br /> },<br /> "aggregations" : {<br /> "PV" : {<br /> "cardinality" : {<br /> "field" : "userssid"<br /> }<br /> }<br /> }<br /> }<br /> }<br /> }<br />
目的是对用户访问的URL进行分组统计,按独立用户数来排序。
执行后,data节点频繁FGC,内存无法回收,随即OOM,然后data节点脱离,集群变为red。
最初以为是cardinality精度问题导致内存使用过多,随即将precision_threshold设置为100,再次执行,内存使用量确实少了很多,但是还是用到GB级别。为了确认是否是cardinality问题,去掉外层聚合,直接执行
json<br /> "aggregations" : {<br /> "PV" : {<br /> "cardinality" : {<br /> "field" : "userssid"<br /> }<br /> }<br /> }<br />
发现响应非常快,而且内存占用只有KB级别。
再次单独执行外部聚合,发现也非常快,于是猜测是order导致,将order去掉,果然,如丝般顺滑,再也没有OOM。
为了解决这种OOM,首先想到的是熔断器。默认indices.breaker.request.limit配置是60%。改成10%后,触发熔断,集群正常,但是多点几次之后,data还是出现OOM了。
于是逐步调试,发现每执行1次,内存就增加一点,熔断返回后并没有被回收,直到OOM。基本确定是这里的order导致内存泄露了。
就在此时,同事反馈在5.6不会有这个问题,于是去查release note,果然在[5.5的版本](https://www.elastic.co/guide/e ... 0.html)发现fix了这个问题。[问题描述](https://github.com/elastic/elasticsearch/pull/24941)。
这个bug的根本原因是:
<br /> terms aggregations at the root level use the global_ordinals execution hint by default.<br /> When all sub-aggregators can be run in breadth_first mode the collected buckets for these sub-aggs are dense (remapped after the initial pruning).<br /> But if a sub-aggregator is not deferrable and needs to collect all buckets before pruning we don't remap global ords and the aggregator needs to deal with sparse buckets.<br /> Most (if not all) aggregators expect dense buckets and uses this information to allocate memories.<br /> This change forces the remap of the global ordinals but only when there is at least one sub-aggregator that cannot be deferred.<br />
解决方案:
1,升级到5.5以上版本;

2,DSL增加"execution_hint":"map",属性。
```json
{
"size" : 0,
"query" : { },
"_source" : false,
"aggregations" : {
"aggData" : {
"terms" : {
"field" : "url",
"size" : 200,
"execution_hint":"map",
"min_doc_count" : 1,
"shard_min_doc_count" : 0,
"show_term_doc_count_error" : false,
"order" : [
{
"PV" : "desc"
}
]
},
"aggregations" : {
"PV" : {
"cardinality" : {
"field" : "userssid"
}
}
}
}
}
}

ELK采集不同项目的日志,会不会存在日志打印到别的系统而获取不到的情况

Elasticsearchstrglee 回复了问题 • 2 人关注 • 1 个回复 • 2261 次浏览 • 2018-06-13 18:55 • 来自相关话题

现在有没有kibana访问mysql数据库的插件

Kibanav0yager 回复了问题 • 3 人关注 • 3 个回复 • 7398 次浏览 • 2018-06-13 17:40 • 来自相关话题

docker-ce-18.03.1版本下获取运行了elk-6.2.3的镜像,请问再怎么安装x-pack?

Kibanahulangde2012 回复了问题 • 5 人关注 • 5 个回复 • 3202 次浏览 • 2018-06-13 15:54 • 来自相关话题

esrally测了几次,还是插入索引操作error rate总是100%

回复

Elasticsearchjohn123 发起了问题 • 0 人关注 • 0 个回复 • 3234 次浏览 • 2018-06-13 15:26 • 来自相关话题

按天创建索引问题

Elasticsearch531651225@qq.com 回复了问题 • 5 人关注 • 3 个回复 • 6894 次浏览 • 2018-06-13 14:40 • 来自相关话题

ES 5.1.1 每到固定时间点就会shard failed

Elasticsearchhighmoutain 回复了问题 • 5 人关注 • 5 个回复 • 2252 次浏览 • 2018-06-13 10:54 • 来自相关话题

kibana能不能自动匹配es的索引去创建索引。

Kibanaa505100745 回复了问题 • 3 人关注 • 3 个回复 • 5436 次浏览 • 2018-06-13 10:35 • 来自相关话题

kibana data table怎么去取某个字段的平均值.

Kibanaa505100745 回复了问题 • 2 人关注 • 4 个回复 • 4377 次浏览 • 2018-06-13 10:34 • 来自相关话题

某个分片上的build_scorer远远大于其它分片

Elasticsearchthe_best 回复了问题 • 5 人关注 • 3 个回复 • 3868 次浏览 • 2018-06-13 10:20 • 来自相关话题

spring-data-elasticsearch 如何让es自动生成_id

回复

Elasticsearchredhat 发起了问题 • 1 人关注 • 0 个回复 • 3967 次浏览 • 2018-06-13 10:15 • 来自相关话题

社区日报 第301期 (2018-06-13)

社区日报千夜 发表了文章 • 0 个评论 • 1411 次浏览 • 2018-06-13 09:49 • 来自相关话题

1.Elasticsearch 团队开发章程(中文版)
http://t.cn/RBMHmUT 
2.PB级海量数据服务平台架构设计实践
http://t.cn/ROy5UyN 
3.知识库全文检索的最佳实践
http://t.cn/RBM8Mca 
 
活动预告:
1.6月30日南京meetup参会报名中
https://elasticsearch.cn/m/article/647 
2.7月21日上海meetup演讲申请中
https://elasticsearch.cn/m/article/655 
 
编辑:江水
归档:https://elasticsearch.cn/article/665
订阅:https://tinyletter.com/elastic-daily