I have MongoDB running in Docker for Windows on my local machine. The configuration from my compose file is:
mongo:
image: mongo:latest
ports:
- "27017:27017"
At the moment i am building an import process with ASP.NET Core where I have to import about 1.1 Mio documents. I realized that the import process just stops after about 400k items. When I break the process I a task from the network layer (NetworkStream.WriteAsync) but no busy or waiting thread at all. MongoDB is still alive, I can connect with MongoChef and also run queries.
I import the document in batches of 5.000 items:
var requests =
this.transformedHotels.Select(x =>
new ReplaceOneModel<MongoTransformedHotel>(Builders<MongoTransformedHotel>.Filter.Eq(y => y.Id, x.Id), x)
{
IsUpsert = true
});
return this.collection.BulkWriteAsync(requests);
When I run MongoDB without docker it works. What can cause my network connection to hang?