How to fix the limit of 1000 shards per cluster in ES

这篇具有很好参考价值的文章主要介绍了How to fix the limit of 1000 shards per cluster in ES。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

Let’s first take a look at the error message in the console.

elasticsearch.exceptions.RequestError: 
RequestError(400, 'validation_exception', 'Validation Failed: 1: 
this action would add [2] shards, 
but this cluster currently has [1000]/[1000] maximum normal shards open;')

The error message you’re seeing indicates that the maximum number of shards allowed in your Elasticsearch cluster has been reached. By default, Elasticsearch has a limit of 1000 shards per cluster.

To fix this error, you have a few options:

  1. Increase the maximum number of shards: You can increase the maximum number of shards allowed in your Elasticsearch cluster by modifying the cluster.max_shards_per_node setting in your Elasticsearch configuration file (elasticsearch.yml). Set it to a higher value that suits your needs. After making the change, you’ll need to restart Elasticsearch for the new setting to take effect. Or to modify the cluster.max_shards_per_node setting in Elasticsearch using the API, you can make a PUT request to the _cluster/settings endpoint. Here’s an example using the curl command:

    curl -XPUT -H "Content-Type: application/json" -d '{
      "persistent": {
        "cluster.max_shards_per_node": {{new_max_shards}}
      }
    }' http://localhost:9200/_cluster/settings
    

    Replace {{new_max_shards}} with the desired new value for cluster.max_shards_per_node.
    Make sure to adjust the URL (http://localhost:9200) if your Elasticsearch cluster is running on a different host or port.
    Note that modifying the cluster settings requires administrative privileges. Also, keep in mind that changing this setting will affect the entire cluster, so consider the impact on performance and resource usage before making any changes.

  2. Reduce the number of shards: If you have control over the index settings, you can reduce the number of shards for your indices. You can either merge smaller indices into larger ones or reduce the number of shards when creating new indices. This will help free up shard slots in your cluster.

  3. Delete unnecessary indices: If you have any unnecessary indices that are no longer needed, you can delete them to free up shard slots. However, be cautious when deleting indices as it will permanently remove the data.

Remember to consider the performance and resource limitations of your Elasticsearch cluster when making changes to the shard configuration.文章来源地址https://www.toymoban.com/news/detail-779161.html

到了这里,关于How to fix the limit of 1000 shards per cluster in ES的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包赞助服务器费用

相关文章

  • How to understand the Trusted Intelligent Computing Service in Huawei Cloud

    How to understand the Trusted Intelligent Computing Service in Huawei Cloud

      可信智能计算服务TICS( Trusted Intelligent Computing Service )打破数据孤岛,在数据隐私保护的前提下,实现行业内部、各行业间的多方数据联合分析和联邦计算。TICS基于安全多方计算MPC、区块链等技术,实现了数据在存储、流通、计算过程中端到端的安全和可审计,推动了

    2024年02月03日
    浏览(14)
  • How to Fix Microsoft Teams Error caa70004

    How to Fix Microsoft Teams Error caa70004

    teams 0xCAA70004 问题: Microsoft Teams无法登录,总是以访客的形式开会 解决方案 1、彻底退出Microsoft Teams的账号 2、在命令行搜索窗口输入 %appdata%Microsoftteams ,并按照回车键 3、进入下列目录后,找到cache文件夹,将cache文件夹中的内容清除 4、重启电脑、重启Teams 参考 How to Fix M

    2024年02月11日
    浏览(15)
  • How to boot the Raspberry Pi system from a USB Mass Storage Device All In One

    How to boot the Raspberry Pi system from a USB Mass Storage Device All In One

    如何从 USB 启动树莓派引导系统 / 如何从 USB 大容量存储设备启动 Raspberry Pi 系统 First Stage Bootloader Second Stage Bootloader https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#raspberry-pi-4-boot-flow https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#raspberry-pi-4-bootloader-configuration BO

    2024年02月06日
    浏览(32)
  • elasticsearch查询出现Limit of total fields 1000 has been exceeded

    在项目中使用elasticsearch保存日志等相关数据,查询页面查询这些日志数据 提示:这里描述项目中遇到的问题: 今天在检查日志数据时,发现数据出不来,检查后端日志,发现一直在报Limit of total fields 1000 has been exceeded的问题 提示:这里填写问题的分析: 经过问题排查,发现

    2024年02月04日
    浏览(11)
  • 解决Elasticsearch索引报错问题之Limit of total fields 1000 has been exceeded ...

    解决Elasticsearch索引报错问题之Limit of total fields 1000 has been exceeded ...

    在Kibana上查询生产环境的日志时,发现某个一直无法查询到,怀疑想要的日志被丢弃了,遂登录服务器查询原始日志,果然发现日志存在被丢弃的问题。经定位,在Logstash的日志中发现问题所在: Elasticsearch的Mapping做了映射保护,为了防止索引中错误的内容导致Mapping

    2024年02月11日
    浏览(10)
  • How do I fix “SLF4J: Failed to load class “org.slf4j.impl.StaticLoggerBinder“.“

    有几种方法,参考这个:java - How do I fix \\\"SLF4J: Failed to load class \\\"org.slf4j.impl.StaticLoggerBinder\\\".\\\" - Stack Overflow 我用这个管用--Also,you can try adding these SLF4J maven dependencies into your pom and let me know if this works:

    2024年02月11日
    浏览(10)
  • Java异常 #Number of lines annotated by Git is not equal to number of lines in the file, check file …

    Java异常 #Number of lines annotated by Git is not equal to number of lines in the file, check file …

    在项目中某个 java 文件左边栏右键查看代码版本履历(Annotate)时无法显示,IDEA 提示:Number of lines annotated by Git is not equal to number of lines in the file, check file encoding and line separators.   这个问题涉及到不同操作系统下文本文件的换行符差异引起的。在不同操作系统中,文本文件的

    2024年02月03日
    浏览(28)
  • uniapp [Vue warn]: Error in onLoad hook: “TypeError: Attempting to change the setter of an unconfigu

    用uniapp开发微信小程序时候发现报这个错误,记录下我是如何解决的! uniapp [Vue warn]: Error in onLoad hook: \\\"TypeError: Attempting to change the setter of an unconfigurable property.\\\" 由于在Object.defineproperty方法中,控制属性不可以被删除, unconfigurable 状态。 我们来看下 Object.defineproperty方法的具体

    2024年02月13日
    浏览(10)
  • how to read dwarf in linux

    Makefile demo.c

    2024年02月16日
    浏览(12)
  • How to Write and Publish a Scientific Paper-How to Write the Results

    至此,我们进入了本文的核心- -数据。论文的这一部分称为结果部分。 与流行的信念相反,你不应该通过描述你在材料和方法部分无意中遗漏的方法来开始结果部分。 结果部分通常有两个成分。首先,你应该对实验进行某种整体的描述,提供大概的图景,而不必重复先前在

    2024年02月09日
    浏览(9)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包