"An existing connection was forcibly closed by the remote host" when running mongorestore on localhost

What do I have:

  • Mongodb 3.0.2 runs on localhost (Windows 7 Pro)
  • Local .bson file (~ 60 GB)
  • 32 GB of RAM

What am I doing:

C: \ Program Files \ MongoDB \ Server \ 3.0 \ bin> mongorestore --collection event_name --db filename F: \ path_to_bson \ archive.bson

Result:

  • 100% RAM usage at 30%
  • Lots of errors: "Error: WSARecv tcp 127.0.0.1:49587: An existing connection was forcibly closed by the remote host." appear when ~ 60% done
  • Not all documents were recovered as a result.

If I use a different archive for recovery (which is smaller, ~ 6 GB), that's ok

Question: How to recover all documents from .bson? Thanks in advance.

+3


source to share


1 answer


I had this problem on Windows a minute ago (client and server on the same computer). The same code works great on Linux.

I ran into the problem reducing the number of inserted / updated elements per bulk operation.



I am doing this in an application. I don't see an option in the mongorestore docs to reduce the number of records in a bulk operation.

+3


source







All Articles