Does it work again if you do what the error message says?
I think it wont, because I’m pretty sure it has nothing to do with the number of records. It seems like the number of visits total interactions is bigger than the used data type (smallint(5)) can handle. @thomas_matomo can you have a look at this please?
You (@jfrancois) can confirm that this is the issue by running the following query against your Matomo database:
SELECT visit_total_interactions FROM matomo_log_visit WHERE idvisitor = 'K\xa9E\xfd\x97Z\x1c\xe6' AND idsite = 3 AND idvisit = 12