1

When tried to import the JSON file using mongoimport I got this error:

"Failed: an inserted document is too large"

I tried using batch size too, but still, I am getting the error

mongoimport --db=enviact --collection=eactdata --file=C:\Users\Administrator\Downloads\databk2L.json

mongoimport --db=enviact --collection=eactdata --file=C:\Users\Administrator\Downloads\databk2L.json --batchSize=1
2
  • Try splitting into multiple files with smaller chunks Commented Aug 8, 2020 at 8:11
  • What is the content of that file? It's not a single JSON array, is it? Commented Aug 8, 2020 at 18:41

1 Answer 1

1

If your document exceeds 16MB you need to use the GridFS API to get it loaded.

https://docs.mongodb.com/manual/reference/limits/

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.