insert:key too large to index…
在使用mongosync遷移資料過程中,目標庫log提示如下錯誤:
發現在bulid index的時候遇到”key too larger to index”錯誤,並且每次報錯後會重新開始建立這個索引,再次報錯,再次重建。。。。。。一直retry index bulid,於是資料同步卡在這塊了
經過查詢發現:
Mongo啟動時有noIndexBuildRetry選項,指定此引數則不會去嘗試重建索引
再次檢視官當,發現:
大概意思是:
在mongoDB2.6 ,當insert或者update一個長度大於Index key length Limit的操作,mongo將會返回一個錯誤給客戶端。而在早期的mongo版本將會操作成功
為了避免這個問題,你可以使用hash index或者索引計算值.如果你有一個現有的資料集合,那你可以禁用此行為,然後逐步解決這些索引問題,使用引數:
failIndexKeyTooLong來禁用此行為
failIndexKeyTooLong 預設為 true. 當設定為false時, 2.6 例項將提供2.4的行為
執行mongo時,如下關閉:
mongod --setParameter failIndexKeyTooLong=false
解決問題:
停止mongosync 程式
重啟目標庫的mongo例項 指定--setParameter failIndexKeyTooLong=false —noIndexBuildRetry 選項
開啟mongosync進行增量同步(-s 去之前的synclog中找)
再次tail –f mongo.log發現剛才卡著一直retry的地方過去了 但是還是有
錯誤
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/27000195/viewspace-1662275/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- mysql specified key was too long與Index column size too large. The maximum column size is 767 bytes.MySqlIndex
- Index column size too large. The maximum column size is 767 bytesIndex
- Index column size too large. The maximum column size is 767 bytes.Index
- mysql Index column size too large 超過767錯誤解決方案(轉)MySqlIndex
- 1709 - Index column size too large. The maximum column size is 767 bytes.Index
- [Err] 1709 - Index column size too large. The maximum column size is 767 bytes.Index
- MySQL建立表失敗:Index column size too large. The maximum column size is 767 bytesMySqlIndex
- MySQL 5.7 到 5.6,出現 Index column size too large. The maximum column size is 767 bytesMySqlIndex
- MySQL資料庫index column size too large. the maximum column size is 767 bytes問題解決MySql資料庫Index
- mysql5.7 資料匯入5.6 Index column size too large. The maximum column size is 767 bytes.MySqlIndex
- nodejs Error: request entity too large解決方案NodeJSError
- ORA-00064: object is too large to allocate on this O/SObject
- Mysql 報Row size too large 65535解決方法MySql
- Row size too large (> 8126)解決辦法
- 【AWR】Suggestions if Your SYSAUX Tablespace Grows Rapidly or Too LargeUXAPI
- gunzip時,提示file too large(問題已解決)
- system image file too large for device hardware configurationdev
- Oracle11.2新特性之INSERT提示IGNORE_ROW_ON_DUPKEY_INDEXOracleIndex
- MySQL:Specified key was too long; max key length is 767 bytesMySql
- node接收圖片報錯 PayloadTooLargeError: request entity too largeError
- ES報錯Result window is too large問題處理薦
- mysql INSERT ... ON DUPLICATE KEY UPDATEMySql
- Specified key was too long; max key length is 1000 bytes
- mysql中key 、primary key 、unique key 與index區別MySqlIndex
- 上傳報錯 Status Code: 413 Payload Too Large 請教!
- Java程式碼解決ElasticSearch的Result window is too large問題JavaElasticsearch
- Nginx出現413 Request Entity Too Large錯誤解決方法Nginx
- Nginx 報錯413 Request Entity Too Large 上傳檔案過大Nginx
- MySQL insert on duplicate key update 死鎖MySql
- REPLACE與INSERT INTO ... ON DUPLICATE KEY總結
- Laravel 5.4 常見錯誤:Specified key was too longLaravel
- MySQL批量Insert應用ON DUPLICATE KEY UPDATEMySql
- 【es】FATAL [circuit_breaking_exception] [parent] Data too large, data for [<http_request>] would beUIExceptionHTTP
- [Mark]解決ElasticSearch深度分頁機制中Result window is too large問題Elasticsearch
- 【MOS】Index Rebuild Is Hanging Or Taking Too Long (文件 ID 272762.1)IndexRebuild
- 【解決方法】Dubbo報錯Data length too large,調整payload大小解決
- Oracle Index Key Compression索引壓縮OracleIndex索引
- hint IGNORE_ROW_ON_DUPKEY_INDEXIndex