0
MongoDB를 버전 : 2.6.0MongoDB를 수집 오류에서 업데이트 배열
collecton 필드 :
books{
_id,
chatpers : [ //a book has many chatpers, so the "chatpers" is an Array.
{
_id,
_parentId,
text
}
]
}
내가 쿼리를 실행했다 :
db.books.update({
_id : ObjectId("5354725719980e913e9be3f1"),
"chapters._id" : "93cdb3d14da841aabde0dd65aa2fa343"
}, {
"$set" : {
"chapters.$.text" : "5.3 Handler",
"chapters.$._parentId" : "ef5c3f14147f417b936221db00deff38"
}
});
문제 : 챕터의 길이가 작 으면 잘 작동합니다. 챕터의 길이가 120 개 이상으로 증가하면, MongoDB를가 오류를보고하고 종료 : 당신의 친절들에 대한
2014-11-04T18:44:00.759-0700 DBClientCursor::init call() failed
2014-11-04T18:44:00.761-0700 Error: error doing query: failed at src/mongo/shell/collection.js:416
2014-11-04T18:44:00.765-0700 trying reconnect to 127.0.0.1:27017 (127.0.0.1) failed
2014-11-04T18:44:00.766-0700 warning: Failed to connect to 127.0.0.1:27017, reason: errno:111 Connection refused
2014-11-04T18:44:00.766-0700 reconnect 127.0.0.1:27017 (127.0.0.1) failed failed couldn't connect to server 127.0.0.1:27017 (127.0.0.1), connection attempt failed
감사합니다 아주 많이!