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

don't work purge mysql db #13877

Closed
simpleuser99 opened this issue Dec 18, 2018 · 3 comments
Closed

don't work purge mysql db #13877

simpleuser99 opened this issue Dec 18, 2018 · 3 comments
Labels
answered For when a question was asked and we referred to forum or answered it.

Comments

@simpleuser99
Copy link

simpleuser99 commented Dec 18, 2018

Hello.
My motomo version 3.3.0 and PHP 7.1.24
My matomo mysql db size is 400GB. I want clear a part of my db. I need delete 2015 year and part of 2016.
I go to console and do next command:
./console core:delete-logs-data --dates=2016-02-01,2016-02-31

and view next result:

Preparing to delete all visits belonging to ALL websites between 2015-01-01 00:00:00 and 2016-03-02 00:00:00.
You are about to delete log data. This action cannot be undone, are you sure you want to continue? (Y/N) y
.......................................................................................................................
Successfully deleted 168381 visits. Time elapsed: 899.281s

But my bd do no reduce size.

If I repeat
./console core:delete-logs-data --dates=2016-02-01,2016-02-31
I view

Preparing to delete all visits belonging to ALL websites between 2015-01-01 00:00:00 and 2016-03-02 00:00:00.
You are about to delete log data. This action cannot be undone, are you sure you want to continue? (Y/N) y
Successfully deleted 0 visits. Time elapsed: 487.321s

Why? How can I purge my db?

P.S. When delete process is working, I start strace and view next:

sendto(5, "w\t\0\0\3DELETE FROM `piwik_log_conv"..., 2427, MSG_DONTWAIT, NULL, 0) = 2427
etc

@fdellwing
Copy link
Contributor

How do you check the DB size?

@tsteur
Copy link
Member

tsteur commented Dec 18, 2018

You may need to run optimize table (can take a long time on big size). This is not quite a Matomo related question but MySQL. I recommend you ask in our forum: https://forum.matomo.org or search for something like "mysql reduce disk space after deleting data" or "mysql reclaim disk space"

@tsteur tsteur closed this as completed Dec 18, 2018
@tsteur tsteur added the answered For when a question was asked and we referred to forum or answered it. label Dec 18, 2018
@fdellwing
Copy link
Contributor

I guess you run into this problem: https://forum.matomo.org/t/matomo-using-way-more-disk-space-then-reported/30061/2

If you wanna fix the numbers, run optimize, but you don't need to, because the size already shrunk.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered For when a question was asked and we referred to forum or answered it.
Projects
None yet
Development

No branches or pull requests

3 participants