3

I try to migrate my mongoDb to azure´s cosmosdb. when I try to do the import as following

mongorestore --host $host:10255 -u $user -p $password --ssl --sslAllowInvalidCertificates --batchSize 240 --drop --db chronas-api $folderPath

I get this error:

error: Message: {"Errors":["Request size is too large"]}

I have tried already some other values for the --batchSize param but nothing worked.

can someone help me to workaround this issue?

aumanjoa
  • 905
  • 1
  • 11
  • 30

1 Answers1

1

I have tried already some other values for the --batchSize param but nothing worked.

Since you have already tired to try to reduce the number of import documents each batch, I think you need to make sure that per document is less than 2MB. The maximum size for a document is 2MB based on the official statement.

Hope it helps you.

Jay Gong
  • 23,163
  • 2
  • 27
  • 32