I am trying to add a list of contacts to my db. I am using inertMany to do so. Every thing works fine if amount of contacts i am adding is within 50k. if it exceeds that not all data is being save to db. the response i get after insert is { ok: 1, n: 1047 }
. Anybody know why this is happening ?
Asked
Active
Viewed 206 times
0

Akhil S
- 145
- 14
-
Does this answer your question? [Mongoose insertMany limit](https://stackoverflow.com/questions/36042967/mongoose-insertmany-limit) – Manuel Spigolon Apr 24 '20 at 10:05
-
You should use `initializeOrderedBulkOp()` instead – Manuel Spigolon Apr 24 '20 at 10:06