Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ScheduledTasks] The SELECT would examine more than MAX_JOIN_SIZE rows #6496

Closed
Capenus opened this issue Oct 22, 2014 · 3 comments
Closed
Assignees
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Milestone

Comments

@Capenus
Copy link

Capenus commented Oct 22, 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?

tsteur added a commit that referenced this issue Oct 22, 2014
@mattab
Copy link
Member

mattab commented Oct 23, 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?

@mattab mattab added the Bug For errors / faults / flaws / inconsistencies etc. label Oct 23, 2014
@mattab mattab added this to the Piwik 2.9.0 milestone Oct 23, 2014
@mattab mattab self-assigned this Oct 23, 2014
@Capenus
Copy link
Author

Capenus commented Oct 23, 2014

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

@Capenus
Copy link
Author

Capenus commented Oct 27, 2014

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

@mattab mattab closed this as completed in b91060e Oct 28, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Projects
None yet
Development

No branches or pull requests

2 participants