Elasticsearch 7.4集群内部的某些事情因读取超时而变得越来越慢 [英] Something inside Elasticsearch 7.4 cluster is getting slower and slower with read timeouts now and then

查看:71
本文介绍了Elasticsearch 7.4集群内部的某些事情因读取超时而变得越来越慢的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

通常在过去的几天中,我们的ES 7.4群集(4个节点)提供读取超时,并且在运行某些管理命令时变得越来越慢.在此之前,它已经运行了一年多,没有任何麻烦.例如,/_ cat/nodes昨天花费2分钟执行,而今天已经花费4分钟.服务器负载很低,内存使用情况似乎很好,不确定是否需要进一步查找.

Regularly the past days our ES 7.4 cluster (4 nodes) is giving read timeouts and is getting slower and slower when it comes to running certain management commands. Before that it has been running for more than a year without any trouble. For instance /_cat/nodes was taking 2 minutes yesterday to execute, today it is already taking 4 minutes. Server loads are low, memory usage seems fine, not sure where to look further.

使用opster.com在线工具,我设法获得了一些提示,即管理队列很大,但是在执行建议的命令进行调查时,除了命令花费了很长时间外,我看不到其他任何异常给出结果:

Using the opster.com online tool I managed to get some hint that the management queue size is high, however when executing the suggested commands there to investigate I don't see anything out of the ordinary other than that the command takes long to give a result:

$ curl "http://127.0.0.1:9201/_cat/thread_pool/management?v&h=id,active,rejected,completed,node_id"
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   345  100   345    0     0      2      0  0:02:52  0:02:47  0:00:05    90
id                     active rejected completed node_id
JZHgYyCKRyiMESiaGlkITA      1        0   4424211 elastic7-1
jllZ8mmTRQmsh8Sxm8eDYg      1        0   4626296 elastic7-4
cI-cn4V3RP65qvE3ZR8MXQ      5        0   4666917 elastic7-2
TJJ_eHLIRk6qKq_qRWmd3w      1        0   4592766 elastic7-3

我该如何调试/解决此问题?预先感谢.

How can I debug this / solve this? Thanks in advance.

推荐答案

如果您发现您的 elastic7-2 节点在管理队列中有5个活动请求,这确实很高,队列容量本身只有5个,仅用于很少的操作(管理,而不是搜索/索引).

If you notice your elastic7-2 node is having 5 active requests in the management queue, which is really high, As the management queue capacity itself is just 5, and it's used only for very few operations(Management, not search/index).

您可以看一下 elasticsearch中的线程池供进一步阅读.

You can have a look at threadpools in elasticsearch for further read.

这篇关于Elasticsearch 7.4集群内部的某些事情因读取超时而变得越来越慢的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆