I have noticed an issue with history data not being stored, when looking at store and forward engine there is a significant about of quarantined data with the following “Duplicate entry” error?
I would suggest first looking at configurations that are set to store data twice to the same database. A few examples of this would be a tag history splitter that’s pointing to multiple instances of the same database, the second scenario would be a configuration with central and remote gateways that are both set to store tag history to the same database. Another scenario would be if you have a remote edge gateway syncing tag history and have performed a reset on the SyncID as mentioned here.
Outside of those scenarios, I would suggest exporting the quarantine file and investigating the tags that are flagging duplicate data being stored.