Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-11289

Document use of failIndexKeyTooLong parameter during restore

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None

      Moved to Docs:

      • When using mongorestore, if users experience "key too large to index", they should restart the DB with --setParameter failIndexKeyTooLong=0 and retry the restore.

      Original:

      I've just done a mongodump on 3.2 and now doing a restore on a 3.4 server. I'm getting errors like:

      code
      2017-07-22T21:17:26.085+0000 restoring indexes for collection jerome5.BugReport from metadata
      2017-07-22T21:17:26.555+0000 Failed: jerome5.BugReport: error creating indexes for jerome5.BugReport: createIndex error: WiredTigerIndex::insert: key too large to index, failing 69040 { : "Cache Thu Apr 02 21:00:01 UTC 2015 sourceText mismatch: <!DOCTYPE html>
      <html>
      <head>
      <base href="http://articles.if.ua/" />
      <link rel="StyleSheet" hr...", : ObjectId('552605abe4b0b601f78f8700') }
      code

      I don't see any option in https://docs.mongodb.com/manual/reference/program/mongorestore/ to continue after insert errors like this. Shouldn't it be possible to force insert of documents that can't be indexed?

      I don't want to skip indexes for all with --noIndexRestore so what to do?

            Assignee:
            kay.kim@mongodb.com Kay Kim (Inactive)
            Reporter:
            niccottrell Nic Cottrell (Personal)
            Votes:
            1 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved:
              6 years, 14 weeks ago