We are hosting Matomo on our k8s instance on prem.
I have 3 pods running:
- matomo itself
- mariadb database
- archive cron (every 30 minutes)
On the 17th of August, the archive process suddenly stopped working… I noticed only a couple of days later and found the following error for many days:
Error: Got invalid response from API request: ?module=API&method=CoreAdminHome.archiveReports&idSite=2&period=year&date=2022-01-01&format=json&segment=entryPageUrl%3D%40https%25253A%25252F%
25252Fxxx.com%25252Forganization%25252F&trigger=archivephp. Response was '{"result":"error","message":"Mysqli statement execute error : Too many active concurrent transactions #0 \/var\/www\/html\/libs\/Zend\/D
b\/Statement.php(300): Zend_Db_Statement_Mysqli->_execute(Array) #1 \/var\/www\/html\/libs\/Zend\/Db\/Adapter\/Abstract.php(479): Zend_Db_Statement->execute(Array) #2 \/var\/www\/html\/core\/DataAccess\/LogAggregator.p
hp(325): Zend_Db_Adapter_Abstract->query('INSERT INTO mat...', Array) #3 \/var\/www\/html\/core\/DataAccess\/LogAggregator.php(351): Piwik\\DataAccess\\LogAggregator->createTemporaryTable('logtmpsegment94...', 'SELECT
\/* trigg...', Array) #4 \/var\/www\/html\/core\/DataAccess\/LogAggregator.php(561): Piwik\\DataAccess\\LogAggregator->generateQuery('count(distinct ...', Array, 'log_visit.visit...', '', '') #5 \/var\/www\/html\/core\/Ar
chiveProcessor\/PluginsArchiver.php(285): Piwik\\DataAccess\\LogAggregator->queryVisitsByDimension() #6 \/var\/www\/html\/core\/ArchiveProcessor\/PluginsArchiver.php(102): Piwik\\ArchiveProcessor\\PluginsArchiver->aggr
egateDayVisitsMetrics() #7 \/var\/www\/html\/core\/ArchiveProcessor\/Loader.php(278): Piwik\\ArchiveProcessor\\PluginsArchiver->callAggregateCoreMetrics() #8 \/var\/www\/html\/core\/ArchiveProcessor\/Loader.php(176): Piwi
k\\ArchiveProcessor\\Loader->prepareAllPluginsArchive(1, 0) #9 \/var\/www\/html\/core\/ArchiveProcessor\/Loader.php(159): Piwik\\ArchiveProcessor\\Loader->insertArchiveData(1, 0) #10 \/var\/www\/html\/core\/ArchiveProc
essor\/Loader.php(99): Piwik\\ArchiveProcessor\\Loader->prepareArchiveImpl('VisitsSummary') #11 \/var\/www\/html\/core\/Context.php(75): Piwik\\ArchiveProcessor\\Loader->Piwik\\ArchiveProcessor\\{closure}() #12 \/var\/
www\/html\/core\/ArchiveProcessor\/Loader.php(103): Piwik\\Context::changeIdSite(2, Object(Closure)) #13 \/var\/www\/html\/plugins\/CoreAdminHome\/API.php(277): Piwik\\ArchiveProcessor\\Loader->prepareArchive('VisitsSumma
ry') #14 \/var\/www\/html\/core\/Archive.php(894): Piwik\\Plugins\\CoreAdminHome\\API->archiveReports(2, Object(Piwik\\Period\\Day), '2022-08-24', 'entryPageUrl%3D...', 'VisitsSummary', '') #15 \/var\/www\/html\/core\/Arc
hive.php(686): Piwik\\Archive->prepareArchive(Array, Object(Piwik\\Site), Object(Piwik\\Period\\Day)) #16 \/var\/www\/html\/core\/Archive.php(624): Piwik\\Archive->cacheArchiveIdsAfterLaunching(Array, Array) #17 \/var\
/www\/html\/core\/Archive.php(549): Piwik\\Archive->getArchiveIds(Array) #18 \/var\/www\/html\/core\/Archive.php(347): Piwik\\Archive->get(Array, 'numeric') #19 \/var\/www\/html\/core\/ArchiveProcessor.php(630): Piwik\
\Archive->getDataTableFromNumeric(Array) #20 \/var\/www\/html\/core\/ArchiveProcessor.php(265): Piwik\\ArchiveProcessor->getAggregatedNumericMetrics(Array, false) #21 \/var\/www\/html\/core\/ArchiveProcessor\/PluginsAr
chiver.php(306): Piwik\\ArchiveProcessor->aggregateNumericMetrics(Array) #22 \/var\/www\/html\/core\/ArchiveProcessor\/PluginsArchiver.php(104): Piwik\\ArchiveProcessor\\PluginsArchiver->aggregateMultipleVisitsMetrics(
) #23 \/var\/www\/html\/core\/ArchiveProcessor\/Loader.php(278): Piwik\\ArchiveProcessor\\PluginsArchiver->callAggregateCoreMetrics() #24 \/var\/www\/html\/core\/ArchiveProcessor\/Loader.php(176): Piwik\\ArchiveProcessor\
\Loader->prepareAllPluginsArchive(0, 0) #25 \/var\/www\/html\/core\/ArchiveProcessor\/Loader.php(159): Piwik\\ArchiveProcessor\\Loader->insertArchiveData(0, 0) #26 \/var\/www\/html\/core\/ArchiveProcessor\/Loader.php(9
9): Piwik\\ArchiveProcessor\\Loader->prepareArchiveImpl('VisitsSummary') #27 \/var\/www\/html\/core\/Context.php(75): Piwik\\ArchiveProcessor\\Loader->Piwik\\ArchiveProcessor\\{closure}() #28 \/var\/www\/html\/core\/Ar
chiveProcessor\/Loader.php(103): Piwik\\Context::changeIdSite(2, Object(Closure)) #29 \/var\/www\/html\/plugins\/CoreAdminHome\/API.php(277): Piwik\\ArchiveProcessor\\Loader->prepareArchive('VisitsSummary') #30 \/var\/www
\/html\/core\/Archive.php(894): Piwik\\Plugins\\CoreAdminHome\\API->archiveReports(2, Object(Piwik\\Period\\Week), '2022-08-22', 'entryPageUrl%3D...', 'VisitsSummary', '') #31 \/var\/www\/html\/core\/Archive.php(686): Piw
ik\\Archive->prepareArchive(Array, Object(Piwik\\Site), Object(Piwik\\Period\\Week)) #32 \/var\/www\/html\/core\/Archive.php(624): Piwik\\Archive->cacheArchiveIdsAfterLaunching(Array, Array) #33 \/var\/www\/html\/core\
/Archive.php(549): Piwik\\Archive->getArchiveIds(Array) #34 \/var\/www\/html\/core\/Archive.php(347): Piwik\\Archive->get(Array, 'numeric') #35 \/var\/www\/html\/core\/ArchiveProcessor.php(630): Piwik\\Archive->getD
ataTableFromNumeric(Array) #36 \/var\/www\/html\/core\/ArchiveProcessor.php(265): Piwik\\ArchiveProcessor->getAggregatedNumericMetrics(Array, false) #37 \/var\/www\/html\/core\/ArchiveProcessor\/PluginsArchiver.php(306):
Piwik\\ArchiveProcessor->aggregateNumericMetrics(Array) #38 \/var\/www\/html\/core\/ArchiveProcessor\/PluginsArchiver.php(104): Piwik\\ArchiveProcessor\\PluginsArchiver->aggregateMultipleVisitsMetrics() #39 \/var\/www\
/html\/core\/ArchiveProcessor\/Loader.php(278): Piwik\\ArchiveProcessor\\PluginsArchiver->callAggregateCoreMetrics() #40 \/var\/www\/html\/core\/ArchiveProcessor\/Loader.php(176): Piwik\\ArchiveProcessor\\Loader->prepa
reAllPluginsArchive(134, 0) #41 \/var\/www\/html\/core\/ArchiveProcessor\/Loader.php(159): Piwik\\ArchiveProcessor\\Loader->insertArchiveData(134, 0) #42 \/var\/www\/html\/core\/ArchiveProcessor\/Loader.php(99): Piwik\\Ar
chiveProcessor\\Loader->prepareArchiveImpl('VisitsSummary') #43 \/var\/www\/html\/core\/Context.php(75): Piwik\\Arc ... )\n#83 \/var\/www\/html\/console(32): Symfony\\Component\\Console\\Application->run()\n#84 {main}"}'
Currently it shows:
ERROR [2022-09-15 14:28:24] 125110 482 total errors during this script execution, please investigate and try and fix these errors.
Can you give me any hint what I can do to fix this?
Thanks
3 posts - 2 participants