problems in importing mongodb database
I have some problems in importing mongodb database using restore command. I use the normal mongodump command to dump a database and then try to use mongorestore to restore it in my local server. The problem is when the number of documents in a collection are small the import is successful but when the number of documents are larger then the server crashes. A stacktrace of the log is given below
Wed May 11 16:42:14 [initandlisten] connection accepted from 127.0.0.1:50532 #35
Wed May 11 16:42:14 [FileAllocator] allocating new datafile /var/lib/mongodb/twitter.ns, filling with zeroes...
Wed May 11 16:42:14 [FileAllocator] done allocating datafile /var/lib/mongodb/twitter.ns, size: 16MB, took 0 secs
Wed May 11 16:42:14 [FileAllocator] allocating new datafile /var/lib/mongodb/twitter.0, filling with zeroes...
Wed May 11 16:42:14 [FileAllocator] done allocating datafile /var/lib/mongodb/twitter.0, size: 16MB, took 0 secs
Wed May 11 16:42:14 [FileAllocator] allocating new datafile /var/lib/mongodb/twitter.1, filling with zeroes...
Wed May 11 16:42:14 [FileAllocator] done allocating datafile /var/lib/mongodb/twit开发者_Python百科ter.1, size: 32MB, took 0 secs
Wed May 11 16:42:14 [conn35] building new index on { _id: 1 } for twitter.home_timeline
Wed May 11 16:42:14 [conn35] done for 0 records 0secs
Wed May 11 16:42:14 [FileAllocator] allocating new datafile /var/lib/mongodb/twitter.2, filling with zeroes...
Wed May 11 16:42:14 [FileAllocator] done allocating datafile /var/lib/mongodb/twitter.2, size: 64MB, took 0 secs
Wed May 11 16:42:14 [conn35] building new index on { _id: 1 } for twitter.direct_messages
Wed May 11 16:42:14 [conn35] done for 0 records 0secs
Wed May 11 16:42:14 [conn35] building new index on { aves_user_id: 1.0 } for twitter.home_timeline
Wed May 11 16:42:14 [conn35] done for 3838 records 0.027secs
Wed May 11 16:42:14 [conn35] building new index on { parsed: 1.0 } for twitter.home_timeline
Wed May 11 16:42:14 [conn35] done for 3838 records 0.03secs
Wed May 11 16:42:14 [conn35] building new index on { parsed: 1.0 } for twitter.direct_messages
Wed May 11 16:42:14 Invalid access at address: 0x11dc218a
Wed May 11 16:42:14 Got signal: 11 (Segmentation fault).
Can anyone tell me the reason behind this. Well the remote server is a 64 bit ubuntu while my local server is 32 bit ubuntu. So could this be the reason for the crash. I mean I have just used simple mongodump and mongorestore that's it, then why is it crashing the server.
Plus I don't understand; mongodb isn't stable or what it is always facing the segmentation fault problem. Any insights??
How large are the collections? Do both servers have the same amount of physical memory? Mongo will store as much of the working set into memory as possible, but if the server you're restoring on has dramatically less RAM it could be causing the problem.
精彩评论