Problem archiving month and year on a single site

Hello,

since few months only one of my 136 sites does not archive month and year anymore.

I am using the command line ./console core:archive --url=my_url --force-idsites=26 but i have the same problem when i use ./console core:archive --force-all-websites --force-all-periods=315576000 --force-date-last-n=1000 --url=my_url

Here is the extract :
INFO [2016-12-30 11:02:56] Will pre-process for website id = 26, period = day, date = last1000
INFO [2016-12-30 11:02:56] - pre-processing all visits
INFO [2016-12-30 11:03:08] Archived website id = 26, period = day, 0 segments, 264314 visits in last 1000 days, 0 visits today, Time elapsed: 12.243s
INFO [2016-12-30 11:03:08] Will pre-process for website id = 26, period = week, date = last1000
INFO [2016-12-30 11:03:08] - pre-processing all visits
INFO [2016-12-30 11:04:52] Archived website id = 26, period = week, 0 segments, 264281 visits in last 1000 weeks, 5331 visits this week, Time elapsed: 103.408s
INFO [2016-12-30 11:04:52] Will pre-process for website id = 26, period = month, date = last1000
INFO [2016-12-30 11:04:52] - pre-processing all visits
ERROR [2016-12-30 11:51:08] Got invalid response from API request: ?module=API&method=API.get&idSite=26&period=month&date=last1000&format=php&trigger=archivephp. Response was 'a:2:{s:6:“result”;s:5:“error”;s:7:“message”;s:63:“SQLSTATE[HY000]: General error: 2006 MySQL server has gone away”;}'
INFO [2016-12-30 11:51:08] Archived website id = 26, period = month, 0 segments, 0 visits in last 1000 months, 0 visits this month, Time elapsed: 2775.964s
INFO [2016-12-30 11:51:08] Will pre-process for website id = 26, period = year, date = last1000
INFO [2016-12-30 11:51:08] - pre-processing all visits
ERROR [2016-12-30 12:37:23] Got invalid response from API request: ?module=API&method=API.get&idSite=26&period=year&date=last1000&format=php&trigger=archivephp. Response was 'a:2:{s:6:“result”;s:5:“error”;s:7:“message”;s:63:“SQLSTATE[HY000]: General error: 2006 MySQL server has gone away”;}'
INFO [2016-12-30 12:37:23] Archived website id = 26, period = year, 0 segments, 0 visits in last 1000 years, 0 visits this year, Time elapsed: 2775.119s
INFO [2016-12-30 12:37:23] Archived website id = 26, 4 API requests, Time elapsed: 5666.738s [19/155 done]

I searched for some kind of error message on mysql or nginx/php but none had errors at those times.

Having a front web and a separate bdd i checked the FW and the inactivity timeout is set to 30min.

Can i have some help or tips solving this problem ?

Kind regards,
Velborg

see this FAQ for your error: How do I fix the error "Mysql Server has gone away"? - Analytics Platform - Matomo

Hello Matthieu,

i changed max_allowed_packet = 1024M from 256M, restarted the mysql but i still have the error.

The wait_timeout is set on 1 hour but the error occur after 45 min

Any clue or tips to debug this ?

King Regards,
Velborg

No one can help me on this ?