MongoDB Chunk Migration Failed Solution: Unable to acquire X lock
After adding new shards to our production MongoDB cluster (v4.4.6-ent
with 5 shards, 3 replicas for each shard), we found that the balancer is
not working. sh.status()
displays many chunk migration
errors:
...
balancer:
Currently enabled: yes
Currently running: no
Failed balancer rounds in last 5 attempts: 0
Migration Results for the last 24 hours:
7 : Failed with error 'aborted', from mongo-1 to mongo-3
7208 : Failed with error 'aborted', from mongo-1 to mongo-4
databases:
{ "_id" : "X", "primary" : "mongo-1", "partitioned" : true, "version" : { "uuid" : UUID("xxx"), "lastMod" : 1 } }
X.A
shard key: { "Uuid" : 1 }
unique: false
balancing: true
chunks:
mongo-0 231
mongo-1 327
mongo-2 230
mongo-3 208
...