<p>After a <strong>mongodump</strong> I am trying to restore using <strong>mongorestore</strong>.</p>
<p>It works locally in seconds. However, when I <strong>kubectl exec -it</strong> into the pod of the primary mongodb node and run the same command it gets stuck and endlessly repeats the line with the same progress and an updated timestamp (the first and the last line are the same except the timestamp, so 0 progress). This goes about 5 hours, then I get thrown out with an OOM error.</p>
<p>I am using mongo:3.6.9</p>
<pre><code>2022-03-02T22:56:36.043+0000    [#############...........]  mydb.users  3.65MB/6.37MB  (57.4%)
2022-03-02T22:56:39.043+0000    [#############...........]  mydb.users  3.65MB/6.37MB  (57.4%)
2022-03-02T22:56:42.043+0000    [#############...........]  mydb.users  3.65MB/6.37MB  (57.4%)
2022-03-02T22:56:45.043+0000    [#############...........]  mydb.users  3.65MB/6.37MB  (57.4%)
2022-03-02T22:56:48.043+0000    [#############...........]  mydb.users  3.65MB/6.37MB  (57.4%)
2022-03-02T22:56:51.043+0000    [#############...........]  mydb.users  3.65MB/6.37MB  (57.4%)
2022-03-02T22:56:54.043+0000    [#############...........]  mydb.users  3.65MB/6.37MB  (57.4%)
</code></pre>
<p>The same behavior when I do a mongorestore from a restore container specifying all mongo pods like so <strong>mongorestore --db=mydb --collection=users data/mydb/users.bson  --host mongo-0.mongo,mongo-1.mongo,mongo-2.mongo  --port 27017</strong></p>
<p>Is there anything else I could try?</p>

veste
<p>I found my answer here:
<a href="https://stackoverflow.com/a/41352269/18358598">https://stackoverflow.com/a/41352269/18358598</a></p>
<p><code>--writeConcern '{w:0}'</code>
works.</p>
