@tsteur opened this Issue on September 12th 2021 Member

See error below

[2021-09-05 12:27:14] piwik.DEBUG: SELECT /+ MAX_EXECUTION_TIME(7200000) / / sites 1 / / 2021-09-04,2021-09-05 / / UserCountry / / trigger = CronArchive / log_conversion.idgoal AS idgoal, log_conversion.location_country AS location_country, log_conversion.location_region AS location_region, log_conversion.location_city AS location_city, count(*) AS 1, count(distinct log_conversion.idvisit) AS 3, ROUND(SUM(log_conversion.revenue),2) AS 2, ROUND(SUM(log_conversion.revenue_subtotal),2) AS 4, ROUND(SUM(log_conversion.revenue_tax),2) AS 5, ROUND(SUM(log_conversion.revenue_shipping),2) AS 6, ROUND(SUM(log_conversion.revenue_discount),2) AS 7, SUM(log_conversion.items) AS 8 FROM log_conversion AS log_conversion WHERE log_conversion.server_time >= ? AND log_conversion.server_time <= ? AND log_conversion.idsite IN (?) GROUP BY log_conversion.idgoal, log_conversion.location_country,
log_conversion.location_region, log_conversion.location_city [] {"class":"UserCountry","request_id":"27169"}

[2021-09-05 12:27:15] piwik.ERROR: Uncaught exception in API: PDOException: SQLSTATE[HY000]: General error: 1032 Can't find record in 'log_conversion' in /libs/Zend/Db/Statement/Pdo.php:233 Stack trace: #0 /libs/Zend/Db/Statement/Pdo.php(233): PDOStatement->execute() #1 /libs/Zend/Db/Statement.php(300): Zend_Db_Statement_Pdo->_execute(Array) #2 /libs/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array) #3 /libs/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SELECT /+ MAX...', Array) #4 /core/Db/Adapter/Pdo/Mysql.php(335): Zend_Db_Adapter_Pdo_Abstract->query('SELECT /+ MAX...', Array) #5 [internal function]: Piwik\Db\Adapter\Pdo\Mysql->query('SELECT /+ MAX...', Array) #6 /core/DataAccess/ArchivingDbAdapter.php(59): call_user_func_array(Array, Array) #7 /core/DataAccess/LogAggregator.php(1100): Piwik\DataAccess\ArchivingDbAdapter->query(
'SELECT /
+ MAX...', Array) #8 /plugins/UserCountry/Archiver.php(131): Piwik\DataAccess\LogAggregator->queryConversionsByDimension(Array) #9 /plugins/UserCountry/Archiver.php(51): Piwik\Plugins\UserCountry\Archiver->aggregateFromConversions() #10 /core/Plugin/Archiver.php(89): Piwik\Plugins\UserCountry\Archiver->aggregateDayReport() #11 /core/ArchiveProcessor/PluginsArchiver.php(164): Piwik\Plugin\Archiver->callAggregateDayReport() #12 /core/ArchiveProcessor/Loader.php(218): Piwik\ArchiveProcessor\PluginsArchiver->callAggregateAllPlugins('10007', '1144', false) #13 /core/ArchiveProcessor/Loader.php(158): Piwik\ArchiveProcessor\Loader->prepareAllPluginsArchive('10007', '1144')

Happend around 4 times in 2 months. The log_conversion table exists and has around 150K entries (2.5MB).

Ran optimize table log_conversion for now, will see if that helps (likely not).

I will comment again should this happen more often, putting in backlog for now.

@Starker3 commented on September 13th 2021

A similar issue reported by an On-Premise customer:
2021-09-01 8:18:46 11 [ERROR] mysqld: Can't find record in 'matomo_archive_blob_2021_09' 2021-09-01 8:18:46 11 [Warning] Slave SQL: Could not execute Delete_rows_v1 event on table matomo.matomo_archive_blob_2021_09; Can't find record in 'matomo_archive_blob_2021_09', Error_code: 1032; handler error HA_ERR_KEY_NOT_FOUND; the event's master log mysql-bin.000155, end_log_pos 1346502, Gtid 0-840-74984528, Internal MariaDB error code: 1032

MariaDB 10.4.12 with Master-Master replication

Not sure if its related to the issue reported here.

Powered by GitHub Issue Mirror