MongoDB shutdown during mongodump

Hi Folks,
I was trying to backup my database, having around 50 collections and total records will be somewhere around 80 million. While dumping the collections, I got an error stating

Failed: error writing data for collection `{collection_name} to disk: error reading collection: connection pool for 127.0.0.1:27017 was cleared because another operation failed with: (InterruptedAtShutdown) interrupted at shutdown

I was going through the mongo logs and only thing which I found was,

Interrupted operation as its client disconnected

mongodump verison => 100.6.1
mongo version => 6.0.2

I am unable to find the root cause of the error. Any help will be much appreciated. Thanks!

Sounds like there is not enough disk space to hold the dump.

I don’t think so,

Without the size statistics of your 50 collections it is hard to say if 213G is enough.

Hi @Syed_Ahsan_Hasan_Khan,

In addition to what @steevej has mentioned, the Backup with mongodump documentation advises:

When connected to a MongoDB instance, mongodump can adversely affect mongod performance. If your data is larger than system memory, the queries will push the working set out of memory, causing page faults.

Regarding the above statement, (depending on the operating system and/or environment) it is possible that whilst mongodump was running, the available memory in the system reached a point where mongod was terminated by the OOM killer. Are you aware if there was any memory exhaustion during the mongodump procedure or if OOM killer had ended the mongod process where the mongodump was running against?

In addition to the above, can you also provide the relevant part of the mongod logs when this error happened?

Regards,
Jason

1 Like