Home > database >  Mongoimport unable to import
Mongoimport unable to import

Time:10-02

[size=16 px] [size=14 px] at the time of import directing, performing and then stay on import for the first time after the progress, unchanged, the default is an import 1000, check the database, the data has always been 1000,
1. To establish a collection, perform again, still be the same,
2. Increased - batchSize effect after 1, import for the first time after the progress bar is no longer change
Mongoimport -h 127.0.0.1 - port XXXXX collection database - c - d - a file called logfile. The log
The T10:2017-03-07 40:51. 514 + 0800 connected to: 127.0.0.1: XXXX
The T10:2017-03-07 40:54. 507 + 0800 [...] The database. The collection 4.7 MB/319.1 MB (1.5%)
The T10:2017-03-07 40:57. 507 + 0800 [...] The database. The collection 4.7 MB/319.1 MB (1.5%)
The T10:2017-03-07 41:00. 507 + 0800 [...] The database. The collection 4.7 MB/319.1 MB (1.5%)
The T10:2017-03-07 41:03. 507 + 0800 [...] The database. The collection 4.7 MB/319.1 MB (1.5%)
The T10:2017-03-07 41:06. 507 + 0800 [...] The database. The collection 4.7 MB/319.1 MB (1.5%)


Everybody encountered this problem?

Thank you very much,

CodePudding user response:

File is a json format? Can see if there's an error in the log file

CodePudding user response:

I went to validate the contents of this log, the result is right the json format

CodePudding user response:

Is the shard? No piece of keys?

Take out a few try the insert manually

CodePudding user response:

Through the front-end tool import is no problem, very fast, the original use mongoimport is no problem, suddenly one day not line, during didn't do any changes

CodePudding user response:

Can try to add batchsize options?
I saw on stackoverflow, do not know way,
http://stackoverflow.com/questions/33315243/mongoimport-stuck-at-same-point-while-importing-a-json-file

CodePudding user response:

Add batchsize, such as set to 10, only import 10, don't move

CodePudding user response:

Could you tell me how to solve the problem finally is I also encountered this problem at present, the import after a few have been stuck

CodePudding user response:

The building Lord how to solve?
  • Related