Mysqli prepare error: Lost connection to MySQL server during query

Hi there,I’m getting the following error in the syslog.
The odd thing is that it works good in “Visitors - Visits Log"and " Visits in Real-time” ,but in the other place,it can’t work and says "Oops… there was a problem during the request. Maybe the server had a temporary issue, or maybe you requested a report with too much data. ".

INFO [2021-12-13 08:54:12] 7054  ---------------------------
INFO [2021-12-13 08:54:12] 7054  INIT
INFO [2021-12-13 08:54:12] 7054  Running Matomo 4.6.1 as Super User
INFO [2021-12-13 08:54:12] 7054  ---------------------------
INFO [2021-12-13 08:54:12] 7054  NOTES
INFO [2021-12-13 08:54:12] 7054  - If you execute this script at least once per hour (or more often) in a crontab, you may disable 'Browser trigger archiving' in Matomo UI > Settings > General Settings.
INFO [2021-12-13 08:54:12] 7054    See the doc at: https://matomo.org/docs/setup-auto-archiving/
INFO [2021-12-13 08:54:12] 7054  - Async process archiving supported, using CliMulti.
INFO [2021-12-13 08:54:12] 7054  - Reports for today will be processed at most every 900 seconds. You can change this value in Matomo UI > Settings > General Settings.
INFO [2021-12-13 08:54:12] 7054  ---------------------------
INFO [2021-12-13 08:54:12] 7054  START
INFO [2021-12-13 08:54:12] 7054  Starting Matomo reports archiving...
INFO [2021-12-13 08:54:12] 7054  Start processing archives for site 1.
INFO [2021-12-13 08:54:12] 7054    Will invalidate archived reports for today in site ID = 1's timezone (2021-12-13 00:00:00).
ERROR [2021-12-13 08:54:12] 7054  Uncaught exception: /app/apache24/apache24/htdocs/matomo/libs/Zend/Db/Statement/Mysqli.php(77): Mysqli prepare error: Lost connection to MySQL server during query [Query: , CLI mode: 1]



 [Zend_Db_Statement_Mysqli_Exception]
 Mysqli prepare error: Lost connection to MySQL server during query

I have changed “max_allowed_packet” and “max_allowed_packet” in mysql,but I can’t fix the problem…
T^T Please help me