@@ -29,8 +29,8 @@ cluster sizing video]. As you test different shard configurations, use {kib}'s
29
29
cluster's stability and performance.
30
30
31
31
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 >>.
34
34
35
35
[discrete]
36
36
[[shard-sizing-considerations]]
@@ -214,13 +214,12 @@ PUT my-index-000001/_settings
214
214
--------------------------------------------------
215
215
// TEST[setup:my_index]
216
216
217
-
218
217
[discrete]
219
- [[fix-an-oversharded-cluster ]]
220
- === Fix an oversharded cluster
218
+ [[reduce-cluster-shard-count ]]
219
+ === Reduce a cluster's shard count
221
220
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 .
224
223
225
224
[discrete]
226
225
[[create-indices-that-cover-longer-time-periods]]
@@ -314,3 +313,54 @@ POST _reindex
314
313
}
315
314
}
316
315
----
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