Docs Menu

Docs HomeMongoDB Manual


On this page

  • Description

New in version 3.4.

Enables auto-splitting for the sharded cluster. Auto-splitting is enabled by default.

sh.enableAutoSplit() enables the autosplit flag in the config.settings collection.

You can only run sh.enableAutoSplit() from a mongo shell connected to a mongos instance. sh.enableAutoSplit() errors if run on a mongod instance.


Starting in MongoDB 4.2, sh.startBalancer() also enables auto-splitting for the sharded cluster.

For more information on chunk splits, see Chunk Splits. For more information about how MongoDB balances chunks among shards, see: Manage Sharded Cluster Balancer and Sharded Cluster Balancer.

←  sh.disableAutoSplitsh.enableSharding() →

On this page

Share Feedback
© 2023 MongoDB, Inc.


  • Careers
  • Investor Relations
  • Legal Notices
  • Privacy Notices
  • Security Information
  • Trust Center
© 2023 MongoDB, Inc.