I am having this problem.
SQLSTATE[08S01]: Communication link failure: 1153 Got a packet bigger than 'max_allowed_packet' bytes - caused by plugin UserId
the archives do not work properly on the two sites.
So I changed the setting of MYSQL max_allowed_packet from 64M to 128M, and one site was resolved
However, changing the other site to 1024M, the max_allowed_packet maximum, does not solve the problem
How can I solve this problem?
I wouldn't be surprised if this was just another case of weirdness related to https://github.com/matomo-org/matomo/issues/15451.
If someone still experiences this issue, please try the suggestions from there and if it doesn't work create a new issue.