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
Archive Blob Tables bloating in size #15930
Comments
Same issue on my side. After the 3.13.5 update, my database went down back to 25 MiB after having hit 410 MiB with version 3.13.4. Those 20 MiB has been more or less its size for months before v 3.13.4. |
Putting it for now into 3.13.6 so we don't forget to have a look. It might be possible that eg archives are cleaned up only weekly and they used to be cleaned up daily (just a guess) |
Same here on our 3.13.5 installation. |
After the archive got shrunk by the update to 3.13.5, we are also experiencing the same growth again as before. But It seems to only affect the archives for the same month as before: January (year-archives), March and April. These are only the months, when the installation ran with Matomo 3.13.4 plus the year-archives. No abnormal growth for the month after updating (at least yet) and before. |
Can someone experiencing the problem try to run the following command (from the matomo root directory):
and see if it shrinks the tables? And do you all have cron archiving setup? |
I have scheduled tasks running in my staging environment and a MultiGiga sized DB... Lemme try the command line before of this scheduling ... 🤔 |
As per my op, yes - I posted the cron line I run every 10 minutes
Here's the output from running this:
The table in my database that bloats the most is always 2020_01, and that didn't change size at all when I ran the I then wanted to test to see if the 2020_01 table needed shrinking at this point in time, so ran Hopefully @tassoman can confirm soon with his larger setup. |
I started with a global dimension of 41.3G. Then I ran a first
Then I ran
After this, I ran again the purge all command ending up with the the same dimension but less rows: 56,600,334 |
I suspect this change will solve the problem for the start of year table: https://github.com/matomo-org/matomo/pull/15963/files . Could someone give it a try and see if the If other tables are also bloated and the task is not taking care of duplicates, then please let me know which months are bloated. I'll have to dig further to figure out why something like that would happen. |
I applied that patch, and then But, I then ran So the patch fixes why |
|
@diosmosis is this issue done with the merge of #15963 |
@tsteur should be, unless non-january tables are also still growing. That would be due to a different cause. |
👍 I'll close this issue for now. If anyone still has the issue after the next update please comment and we'll be happy to look into it again. Thanks everyone for the feedback and letting us know. |
This issue has been mentioned on Matomo forums. There might be relevant details there: |
This is a follow-up to #15831.
Since upgrading to 3.13.5, I was able to get my bloated archive tables back to their proper size by running
./console core:purge-old-archive-data all
.However, since then, the tables began to grow in size again.
Things are much better since 3.13.5. I was able to shrink the tables again by running the
purge-old-archive-data
command again. My largest archive blog table then shrank from 50,456 rows and 236 MiB back to 9,910 rows and 7.0 MiB. So I now have a way to solve the problem of the bloated tables (whereas, before 3.13.5, I had no way to shrink those tables).However, they are surely not supposed to grow to the point that they need pruning with a manual command. The table referred to above is for January 2020, to which no new data is added, so I'd expect that archive table to remain the same size.
It may well be that the problem is actually my end. Having read the documentation, I'm running a maintenance command once every 10 minutes:
/usr/bin/php ~/public_html/console core:archive --url=https{domain} >> {log-file}
Is there another command that, when Matomo is behaving correctly, needs running on schedule to keep things running smoothly? (I realise I could run
purge-old-archive-data
with cron, but is it correct behaviour for me to need to do so?)Or are the tables still bloating when they shouldn't be?
The text was updated successfully, but these errors were encountered: