-
Notifications
You must be signed in to change notification settings - Fork 5
FAQ
Matt Simerson edited this page May 26, 2022
·
6 revisions
export ES_URL=https://haraka:pass@elasticsearch:9200
export ESA_URL=https://admin:pass@elasticsearch:9200
this cluster currently has [1000]/[1000] maximum normal shards open
When you see the above error message in your logs, you need to:
- reduce the number of shards in your cluster
- increase your clusters shard limits.
curl -XPUT "$ESA_URL/_cluster/settings" -H 'Content-Type: application/json' -d' { "persistent" : { "action.search.shard_count.limit" : "4500" } }'
The following commands rolls up the April 2022 daily indexes into a single monthly index and then deletes the daily indexes. That reduces the number of shards by a factor of 30.
curl -XPOST --insecure "$ES_URL/_reindex?pretty" -H 'Content-Type: application/json' -d'
{
"conflicts": "proceed",
"source": {
"index": "smtp-transaction-2022-04-*"
},
"dest": {
"index": "smtp-transaction-2022-04"
}
}'
curl -XDELETE --insecure "$ESA_URL/smtp-transaction-2022-04-*"