Skip to content

Implement check if php serialize_precision is properly set to prevent huge matomo_archive_blob-tables #23190

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

Open
rr-it opened this issue Mar 30, 2025 · 1 comment
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. To Triage An issue awaiting triage by a Matomo core team member

Comments

@rr-it
Copy link
Contributor

rr-it commented Mar 30, 2025

Summary

The php serialize_precision ini setting directly influences the BLOB size and thereby the size of matomo_archive_blob-tables.

E.g. serialize_precision=100 results in:

php -r 'echo serialize((float)0.402);'
d:0.40200000000000002398081733190338127315044403076171875;

With a setting like this the matomo_archive_blob-tables really become very huge.

Default setting serialize_precision=-1 results in:

php -r 'echo serialize((float)0.402);'
d:0.402;

Also see:
https://www.php.net/manual/en/ini.core.php#ini.serialize-precision

Since PHP 7.1 the default is serialize_precision=-1.

-1 means that an enhanced algorithm for rounding such numbers will be used.

For PHP versions < 7.1 the default is serialize_precision=17 .

Your Environment

  • Matomo Version:
  • PHP Version:
  • Server Operating System:
  • Additionally installed plugins:
@rr-it rr-it added Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. To Triage An issue awaiting triage by a Matomo core team member labels Mar 30, 2025
@MatomoForumNotifications

This issue has been mentioned on Matomo forums. There might be relevant details there:

https://forum.matomo.org/t/reduce-size-of-archive-tables-blob-use-proper-php-ini-serialize-precision-1/62694/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. To Triage An issue awaiting triage by a Matomo core team member
Development

No branches or pull requests

2 participants