OpenVidu reporting MongoDB errors inserting stats

In my open-vidu logs, I’m periodically getting this kind of error, about every 5 minutes:

openvidu analytics/mongo.go:183 failed to insert stats into MongoDB {“error”: “bulk write exception: write errors: [E11000 duplicate key error collection: openvidu.stats index: id dup key: { _id: "ef340b0ef50544c975722714551010db" }, E11000 duplicate key error collection: openvidu.stats index: id dup key: { _id: "80cb27b368452a8994da0ee639f17b0b" }, E11000 duplicate key error collection: openvidu.stats index: id dup key: { _id: "7a4d2d5d49db07d73e8c7082f1a9aaad" }, E11000 duplicate key error collection: openvidu.stats index: id dup key: { _id: "f869c755ff4ebf4719554c71e150f9cf" }, E11000 duplicate key error collection: openvidu.stats index: id dup key: { _id: "04541ab18fc570834c455e55bed6e0fa" }, E11000 duplicate key error collection: openvidu.stats index: id dup key: { _id: "560d8b193f9021eae1325afee3019aaf" }]”}

the number of duplicate key IDs varies.
What is going on with this one?
I’m using general availability open-vidu V3 on elastic AWS configuration.
I also have an open-vidu v3-beta2 implementation that doesn’t show this error, used the same way / has the same front-facing app.

Independently of these logs, is the data in the dashboard correct? What version do you have deployed? v3.0.0 ?

Thank you for reporting this issue. The problem you’re observing might be due to a concurrency error on the server, which is generating identical stats. This causes a failure when trying to insert the stats into MongoDB, as there is already a stat with the same ID in the database.

We will take a closer look to try and resolve this issue. However, please note that this is not a problem that affects the information displayed in the Dashboard. The duplicate stats are simply discarded from being inserted into MongoDB.

Unless you notice any anomalous information in OpenVidu Dashboard, you can safely ignore these error logs. Thank you for bringing this to our attention.

1 Like