I've seen this happen:
DuplicateKeyError: (u'E11000 duplicate key error collection: project-data.forum_thread index: _id_ dup key: { : "168e810d" }'
I believe this is because the Thread class has _id = FieldProperty(str, if_missing=lambda: h.nonce(8))
and the nonce
function uses hexadecimal so there are 16^8 = 4.3B possibilities, and with many documents in your system, picking one of 4.3B possibilities might happen to be an existing value. We could increase the size of that to 9 or 10, and/or handle the error better (retry?)
kt/8232