Skip to content

Commit 9339271

Browse files
jrodewigstefnestor
andauthored
[DOCS] Add max open shards error to 'Size your shards' (#77287) (#77556)
Changes: * Adds a troubleshooting section and documents the `maximum shards open` error. * Retitles the `Fix an oversharded cluster` to `Reduce a cluster's shard count`. Co-authored-by: James Rodewig <[email protected]> Co-authored-by: Stef Nestor <[email protected]>
1 parent 97abc14 commit 9339271

File tree

1 file changed

+57
-7
lines changed

1 file changed

+57
-7
lines changed

docs/reference/how-to/size-your-shards.asciidoc

Lines changed: 57 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ cluster sizing video]. As you test different shard configurations, use {kib}'s
2929
cluster's stability and performance.
3030

3131
The following sections provide some reminders and guidelines you should consider
32-
when designing your sharding strategy. If your cluster has shard-related
33-
problems, see <<fix-an-oversharded-cluster>>.
32+
when designing your sharding strategy. If your cluster is already oversharded,
33+
see <<reduce-cluster-shard-count>>.
3434

3535
[discrete]
3636
[[shard-sizing-considerations]]
@@ -214,13 +214,12 @@ PUT my-index-000001/_settings
214214
--------------------------------------------------
215215
// TEST[setup:my_index]
216216

217-
218217
[discrete]
219-
[[fix-an-oversharded-cluster]]
220-
=== Fix an oversharded cluster
218+
[[reduce-cluster-shard-count]]
219+
=== Reduce a cluster's shard count
221220

222-
If your cluster is experiencing stability issues due to oversharded indices,
223-
you can use one or more of the following methods to fix them.
221+
If your cluster is already oversharded, you can use one or more of the following
222+
methods to reduce its shard count.
224223

225224
[discrete]
226225
[[create-indices-that-cover-longer-time-periods]]
@@ -314,3 +313,54 @@ POST _reindex
314313
}
315314
}
316315
----
316+
317+
[discrete]
318+
[[troubleshoot-shard-related-errors]]
319+
=== Troubleshoot shard-related errors
320+
321+
Here’s how to resolve common shard-related errors.
322+
323+
[discrete]
324+
==== this action would add [x] total shards, but this cluster currently has [y]/[z] maximum shards open;
325+
326+
The <<cluster-max-shards-per-node,`cluster.max_shards_per_node`>> cluster
327+
setting limits the maximum number of open shards for a cluster. This error
328+
indicates an action would exceed this limit.
329+
330+
If you're confident your changes won't destabilize the cluster, you can
331+
temporarily increase the limit using the <<cluster-update-settings,update
332+
cluster settings API>> and retry the action.
333+
334+
[source,console]
335+
----
336+
PUT _cluster/settings
337+
{
338+
"transient" : {
339+
"cluster.max_shards_per_node": 1200
340+
}
341+
}
342+
----
343+
344+
This increase should only be temporary. As a long-term solution, we recommend
345+
you add nodes to the oversharded data tier or
346+
<<reduce-cluster-shard-count,reduce your cluster's shard count>>. To get a
347+
cluster's current shard count after making changes, use the
348+
<<cluster-stats,cluster stats API>>.
349+
350+
[source,console]
351+
----
352+
GET _cluster/stats?filter_path=indices.shards.total
353+
----
354+
355+
When a long-term solution is in place, we recommend you reset the
356+
`cluster.max_shards_per_node` limit.
357+
358+
[source,console]
359+
----
360+
PUT _cluster/settings
361+
{
362+
"transient" : {
363+
"cluster.max_shards_per_node": null
364+
}
365+
}
366+
----

0 commit comments

Comments
 (0)