Restoring Mongodb database fails using VMC tunneling

237 Views Asked by At

I have successfully published an app to CloudFoundry. When I try and seed the database using VMC tunneling and mongorestore only part of the data is transferred. The restore process hangs part way into the collection. If I use mongorestore to restore the dump to my local mongo instance it works well.

$vmc tunnel energy mongorestore 
Opening tunnel on port 10000... OK
Waiting for local tunnel to become available... OK
Directory or filename to restore from> ./dump/energy

connected to: localhost:10000 
Wed Jan 16 09:22:25 ./dump/energy/twohourlyhistoryDatas.bson
Wed Jan 16 09:22:25     going into namespace [db.twohourlyhistoryDatas]
Wed Jan 16 09:22:27 warning: Restoring to db.twohourlyhistoryDatas without dropping.
   Restored data will be inserted without raising errors; check your server log
   795 objects found
Wed Jan 16 09:22:27     Creating index: { key: { _id: 1 }, ns: "db.twohourlyhistoryDatas", name: "_id_" }

I've left this for several hours and it hasn't finished. Using a network monitor I can see the data being transferred for 10-15 seconds, and then stopping suddenly. Turning on verbose mode for vmc hasn't given any failures. Running mongorestore directly with the same command and very verbose output also hasn't shed any light on the problem.

Apart from this, using CloudFoundry has been outstandingly easy. Any suggestions on where to look now to resolve the issue are welcome!

1

There are 1 best solutions below

1
On

There are size limits on the database (for Mongo it's 240Mb) and also time limits on operations over the tunnel too, how big is the database?