Search code examples
mongodbmongodump

How to solve mongodump timeout expiration?


I am trying to make a DB backup

mongodump -h <remote_ip>:27017 -d <db_name> -u <db_user> -p <db_pwd> --authenticationDatabase admin -o /root/mongodumps

But after a few minutes of the process, I get the error:

Failed: error writing data for collection `<db_name>.<col_name>` to disk: error reading collection: connection(<remote_ip>:27017[-4]) incomplete read of full message: read tcp <local_ip>:43970-><remote_ip>:27017: read: connection timed out

What can I do about it?


Solution

  • This is most likely related to: https://jira.mongodb.org/browse/TOOLS-2543

    So after updating to mongodb 4.2.1 this should be fixed.