Error code 10003

We encountered an unexpected error while trying to update a capped collection in MongoDB after upgrading from 3.0 to 3.2:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
Mongo> db.logItems
.update({_id : ObjectId('566839ad1d8bd6870a1ce5c2')},
{'$set' : {'processed' : true}})
WriteResult({
"nMatched" : 0,
"nUpserted" : 0,
"nModified" : 0,
"writeError" : {
"code" : 10003,
"errmsg" : "Cannot change the size of a document
in a capped collection: 28320 != 28331"
}
})

As it turns out this behaviour is to be expected. The documentation clearly states that the size of a document in a capped collection can not be changed.

Read more »

Some time ago we upgraded our connection pool from Apache Commons DBCP to The Tomcat JDBC Connection Pool. We did so mostly because of the improved concurrency handling but soon found out that the addition of JDBC interceptors was a useful resource in locating performance issues.
SlowQueryReport is one of the included interceptors. It logs queries which take longer to execute then the specified threshold.
While this information can be very valuable it doesn’t quite tell the complete story.

Read more »