I have a script that bulk upserts batches of 1000s into a sharded cluster, as well as in a replica set. In the beginning, everything worked fine but after a while, the script kept pausing for seconds, now minutes and even hours, before it continues to run.
I have monitored the db servers and the CPU seems to be busy, but there is no I/O during the pauses. My guess is that its creating indexes so I tried monitoring the index creation process but with no luck.
So I am kind of stuck and don't know where to look next, any hint is greatly appreciated!
Also on http://stackoverflow.com/questions/36986559/mongodb-bulk-upsert-with-long-pauses