我正在尝试将文档列表转储到 AWS Elasticsearch 实例。它运行良好。然后,突然间它开始抛出这个错误:
{ _index: '<my index name>',
_type: 'type',
_id: 'record id',
status: 403,
error:
{ type: 'cluster_block_exception',
reason: 'blocked by: [FORBIDDEN/8/index write (api)];' } }
我查看了论坛。他们中的大多数人说这是一个 JVM 内存问题。如果超过 92%,AWS 将停止对集群/索引的任何写入。但是,当我检查 JVM 内存时,它显示不到 92%。我在这里遗漏了什么?
最佳答案
此错误是 Amazon ES 服务主动阻止写入以防止集群达到红色或黄色状态。它使用 index.blocks.write
执行此操作.
两个原因是:
When the JVMMemoryPressure metric exceeds 92% for 30 minutes, Amazon ES triggers a protection mechanism and blocks all write operations to prevent the cluster from reaching red status. When the protection is on, write operations fail with a ClusterBlockException error, new indexes can't be created, and the IndexCreateBlockException error is thrown.
When the JVMMemoryPressure metric returns to 88% or lower for five minutes, the protection is disabled, and write operations to the cluster are unblocked.
Elasticsearch has a default "low watermark" of 85%, meaning that once disk usage exceeds 85%, Elasticsearch no longer allocates shards to that node. Elasticsearch also has a default "high watermark" of 90%, at which point it attempts to relocate shards to other nodes.
关于amazon-web-services - AWS Elasticsearch 。禁止/8/索引写入 (api)。无法写入索引,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44383601/