就像mysql一样,发现慢查询对优化性能以及线上排除故障非常重要。
1 2 3 4 |
[2018-02-08T09:23:09,357][DEBUG][o.e.a.s.TransportSearchAction] [node-110] [195737742] Failed to execute fetch phase org.elasticsearch.transport.RemoteTransportException: [node-111][192.168.20.111:9300][indices:data/read/search[phase/fetch/id]] Caused by: org.elasticsearch.common.util.concurrent.EsRejectedExecutionException: rejected execution of org.elasticsearch.transport.TcpTransport$RequestHandler@762a3357 on EsThreadPoolExecutor[search, queue capacity = 1000, org.elasticsea rch.common.util.concurrent.EsThreadPoolExecutor@5fa58f86[Running, pool size = 13, active threads = 13, queued tasks = 1000, completed tasks = 305718666]] |
当出现慢查询时,ES的线程池就会被打满,产生如上的错误信息。
我们可以无需重启的配置ES开启慢查询日志:https://www.elastic.co/guide/cn/elasticsearch/guide/current/logging.html
如果文章帮助您解决了工作难题,您可以帮我点击屏幕上的任意广告,或者赞助少量费用来支持我的持续创作,谢谢~
