Reason: your collection is closed, you cannot complete this action. Details: Limitations
Also, check that your collection is closed? on command:
db.mycol.isCapped()
check the version of MongoDB with the command:
db.version()
[Solve] Create a new collection without limits and copy all your documents.
Copy, replace the name of your collection and paste into your terminal.
// replace <mycol> by <your collections name> db.createCollection( "mycol_temp") var cur = db.mycol.find() while (cur.hasNext()) { mycol = cur.next(); db.mycol_temp.insert(logItem); } db.mycol.drop() db.mycol_temp.renameCollection("mycol")
Now the update () or remove () document is accepted through the reorganization of the collections.
source share