问题描述
RemoteTransportException[[Death][inet[/172.18.0.9:9300]][bulk/shard]];嵌套:EsRejectedExecutionException[拒绝执行(队列容量 50)在 org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction$1@12ae9af];
这是否意味着我一次批量执行了太多操作,或者连续执行了太多批量操作,或者什么?是否有我应该增加的设置或我应该做的不同的事情?
Does this mean I'm doing too many operations in one bulk at one time, or too many bulks in a row, or what? Is there a setting I should be increasing or something I should be doing differently?
一个帖子建议由于最近的默认设置,我认为您需要增加 'threadpool.bulk.queue_size'(可能还有 'threadpool.index.queue_size')设置."但是,我不想在不了解故障的情况下随意增加设置.
One thread suggests "I think you need to increase your 'threadpool.bulk.queue_size' (and possibly 'threadpool.index.queue_size') setting due to recent defaults." However, I don't want to arbitrarily increase a setting without understanding the fault.
推荐答案
您想增加线程池中可用的批量线程数.ES 在多个命名池中留出线程用于各种任务.这些池有一些设置;类型、大小和队列大小.
You want to up the number of bulk threads available in the thread pool. ES sets aside threads in several named pools for use on various tasks. These pools have a few settings; type, size, and queue size.
来自文档:
queue_size 允许控制待处理队列的大小没有线程来执行它们的请求.默认情况下,它被设置到 -1 这意味着它是无界的.当一个请求进来并且队列已满,它将中止请求.
对我来说,这意味着排队等待池中线程执行其中一个的批量请求多于当前的队列大小.文档似乎表明队列大小默认为 -1(上面的文字说明)和 50(文档中对批量的调用说明了这一点).您可以查看源以确保您的es版本或设置更高的数字,看看您的批量问题是否简单离开.
To me that means you have more bulk requests queued up waiting for a thread from the pool to execute one of them than your current queue size. The documentation seems to indicate the queue size is defaulted to both -1 (the text above says that) and 50 (the call out for bulk in the doc says that). You could take a look at the source to be sure for your version of es OR set the higher number and see if your bulk issues simply go away.
这篇关于ElasticSearch 给出关于队列大小的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!