0

Data balancing fails on Mongo cluster with 1 mongos and 3 mongod instances. All the data for the collection fs.chunks stays in the same shard with the following error.

Env: Ubuntu- AWS m3.large,

error from sh.status()

6 : Failed with error 'could not acquire collection lock for test.fs.chunks to migrate chunk [{ : MinKey },{ : MaxKey }) :: caused by :: Lock for migrating chunk [{ : MinKey }, { : MaxKey }) in test.fs.chunks is taken.', from shard0001 to shard0000
3826 : Failed with error 'moveChunk failed to engage TO-shard in the data transfer: can't accept new chunks because there are still 7 deletes from previous migration', from shard0000 to shard0001
7655 : Failed with error 'moveChunk failed to engage TO-shard in the data transfer: can't accept new chunks because there are still 4 deletes from previous migration', from shard0001 to shard0000

0

As I am able to see the chunks error such as

3826 : Failed with error 'moveChunk failed to engage TO-shard in the data transfer: can't accept new chunks because there are still 7 deletes from previous migration', from shard0000 to shard0001 7655 : Failed with error 'moveChunk failed to engage TO-shard in the data transfer: can't accept new chunks because there are still 4 deletes from previous migration', from shard0001 to shard0000

As Asya Kamsky google groups documentation here When importing a large amount of data it is always preferable to pre-split the collection and distribute chunks evenly across the shards and disable balancer before starting the data load. Otherwise you will see the migrations and new data load compete for the same resources, reducing the performance of both.

Yes, you should/can re-enable the balancer after the import is done. But of course it's better to presplit/pre-balance as described here.

For further your ref here

|improve this answer|||||
0

Originally a comment by jjussi:

I have seen those error myself, years ago.

If I remember rightly, a restart of the source shard's primary was enough to flush those stuck deletes.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for?Browse other questions tagged or ask your own question.