@Capenus opened this issue on October 22nd 2014

Once per day the cronjob will fail with the following error message.

task output Piwik\Plugins\CoreAdminHome\Tasks.purgeOutdatedArchives Time elapsed: 3.932s Piwik\Plugins\CoreAdminHome\Tasks.purgeInvalidatedArchives ERROR: SQLSTATE[42000]: Syntax error or access violation: 1104 The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET MAX_JOIN_SIZE=# if the SELECT is okay Piwik\Plugins\PrivacyManager\Tasks.deleteReportData Time elapsed: 0.004s Piwik\Plugins\PrivacyManager\Tasks.deleteLogData Time elapsed: 0.001s Piwik\Plugins\CorePluginsAdmin\Tasks.clearAllCacheEntries Time elapsed: 0.040s Piwik\Plugins\CorePluginsAdmin\Tasks.sendNotificationIfUpdatesAvailable Time elapsed: 0.001s Piwik\Plugins\CoreAdminHome\Tasks.optimizeArchiveTable Time elapsed: 2.869s Piwik\Plugins\UserCountry\GeoIPAutoUpdater.update Time elapsed: 2.272s Piwik\Plugins\CoreUpdater\Tasks.sendNotificationIfUpdateAvailable Time elapsed: 0.001s

I can not edit the MySQL config, is it possible to fix this error on another way?

@mattab commented on October 23rd 2014

@Capenus thanks for the report.

Can you try to edit this file: https://github.com/piwik/piwik/blob/master/core/DataAccess/ArchivePurger.php#L27-27

and before line 27 add the following:

    Db::get()->query('SET SQL_BIG_SELECTS=1');

Does it fix the problem after 1 or 2 days?

@Capenus commented on October 23rd 2014

Thanks @mattab . I added the line and will come back in the next couple of days.

@Capenus commented on October 27th 2014

Hey @mattab , the error seems to be fixed after I added your code. Thanks for your help!

This issue was closed on October 28th 2014
Powered by GitHub Issue Mirror