WordPress attempts to insert a row with a primary or unique key which already exists. MySQL returns a duplicate entry error and WordPress stops the query.
The error appears when the auto‑increment attribute is missing, the table index is corrupted, or a plugin inserts the same value repeatedly. It also occurs after a migration which does not preserve the auto‑increment counter.