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

Add max_allowed_packet diagnostic check #13497

Merged
merged 2 commits into from Nov 26, 2018
Merged

Add max_allowed_packet diagnostic check #13497

merged 2 commits into from Nov 26, 2018

Conversation

tsteur
Copy link
Member

@tsteur tsteur commented Sep 28, 2018

fix #1781

thought about linking to https://matomo.org/faq/troubleshooting/faq_183/ but the FAQ is actually not very helpful.

@tsteur tsteur added not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. Needs Review PRs that need a code review labels Sep 28, 2018
@tsteur tsteur added this to the 3.7.0 milestone Sep 28, 2018
$status = DiagnosticResult::STATUS_WARNING;
$pretty = MetricsFormatter::getPrettySizeFromBytes($maxPacketBytes['Value'], 'M');
$configured = str_replace(array(' M', ' M'), 'MB', $pretty);
$comment = Piwik::translate('Diagnostics_MysqlMaxPacketSizeWarning', array('32MB', $configured));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should not be hardcoded I think.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The referenced issue suggest to set it to at least 64MB, but guess 32MB might be fine as well?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't remember exactly but we talked about it in chat or so. Somewhere 32 was said. Can change it to 64.

Copy link
Member

@sgiehl sgiehl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a small comment. Otherwise looks good and worked locally.

$status = DiagnosticResult::STATUS_WARNING;
$pretty = MetricsFormatter::getPrettySizeFromBytes($maxPacketBytes['Value'], 'M');
$configured = str_replace(array(' M', ' M'), 'MB', $pretty);
$comment = Piwik::translate('Diagnostics_MysqlMaxPacketSizeWarning', array('32MB', $configured));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The referenced issue suggest to set it to at least 64MB, but guess 32MB might be fine as well?

@tsteur tsteur merged commit ad992c4 into 3.x-dev Nov 26, 2018
@tsteur tsteur deleted the 1781 branch November 26, 2018 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Review PRs that need a code review not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New diagnostic checking that max_allowed_packet is at least 64M or issue warning, and recommend 128M
3 participants