@babielau opened this Issue on March 4th 2016

Hi!

There seems to be a serious bug in Piwik:

If you select a date range and try to export a TSV over the GUI, under strange circumstances (high traffic website, site with deep navigation) the exported file shows incorrect statistics. Also the diagram shows incorrect values.

Here a screenshot:
day_gui

The respective URL has 1149 views on Feb 22. The diagram and the exported TSV file show 0 views on this day.

I run Piwik in version 2.15 (but this error already occured in previous versions).

The selection of date ranges seems very unreliable to me. There occured different erros in the past.

Any help?

Thanks and best
hulotte

@sgiehl commented on March 5th 2016 Member

Are you able to reproduce that on http://demo.piwik.org ?
If it is reproducable please post the steps for reproducing and we will have a look.

@tsteur commented on March 6th 2016 Owner

Please also let us know whether the last day you are using is today or whether it is a day in the past.

@babielau commented on March 7th 2016

@sgiehl: I already tried that but the error is not reproducable

@tsteur: I am not 100% sure what you mean with the last day I am using. I compared the numbers for Feb 22 by choosing today vs the numbers from Feb 10 to Feb 23 by choosing date range.

@tsteur commented on March 7th 2016 Owner

I was wondering whether you basically did this on Feb 22? This would mean Feb 22 was today on that day.

Do you maybe remember if you have used this date range before?

Is it maybe possible to get access to your Piwik instance and database? I presume that some kind of archives were marked as finished although they maybe weren't and it's not rearchiving. I can also give you a command to re-archive the data which might fix it.

@babielau commented on March 8th 2016

I checked the statistics on Feb 23 and then again on March 4, so I used this date range before.

I'm afraid we cannot grant access to our Piwik instance and/or database. But the re-archiving idea sounds plausible. Would be great if you could give us the command for re-archiving the data!

@tsteur commented on March 8th 2016 Owner

I just noticed while our API method invalidateArchivedReports says it does support to invalidate range archives, it does not really support it. It's buggy. I've created an issue for this (https://github.com/piwik/piwik/issues/9898).

A workaround that you could try would be to execute the following SQL query to remove the archives from DB manually (you might need to adjust idsite value and prefix for archive table):

delete from `piwik_archive_numeric_2016_02` where date1 = "2016-02-10" and date2= "2016-02-23" and period = 5 and idsite = 1;
delete from `piwik_archive_blob_2016_02` where date1 = "2016-02-10" and date2= "2016-02-23" and period = 5 and idsite = 1;
@babielau commented on March 11th 2016

period=5 seems not to be defined in our instance.

mysql> select name, date1, date2, period from piwik_archive_numeric_2016_02 where period=5;
Empty set (0.00 sec)

mysql> select name, date1, date2, period from piwik_archive_numeric_2016_03 where period=5;
Empty set (0.00 sec)

mysql> select name, date1, date2, period from piwik_archive_blob_2016_02 where period=5;
Empty set (0.00 sec)

mysql> select name, date1, date2, period from piwik_archive_blob_2016_03 where period=5;
Empty set (0.00 sec)

There are just values for periods 1 to 3.

mysql> select distinct(period) from piwik_archive_numeric_2016_02;
+--------+
| period |
+--------+
|      1 |
|      2 |
|      3 |
+--------+
3 rows in set (0.02 sec)

mysql> select distinct(period) from piwik_archive_numeric_2016_03;
+--------+
| period |
+--------+
|      1 |
|      2 |
|      3 |
+--------+
3 rows in set (0.00 sec)

mysql> select distinct(period) from piwik_archive_blob_2016_02;
+--------+
| period |
+--------+
|      1 |
|      2 |
|      3 |
+--------+
3 rows in set (0.05 sec)

mysql> select distinct(period) from piwik_archive_blob_2016_03;
+--------+
| period |
+--------+
|      1 |
|      2 |
|      3 |
+--------+
3 rows in set (0.00 sec)
@tsteur commented on March 13th 2016 Owner

Sorry, just noticed the query wouldn't solve it in this case. Try

delete from `piwik_archive_numeric_2016_02` where date1 = "2016-02-22" and date2= "2016-02-22" and period = 1 and idsite = 1;
delete from `piwik_archive_blob_2016_02` where date1 = "2016-02-22" and date2= "2016-02-22" and period = 1 and idsite = 1;
@mattab commented on March 31st 2016 Owner

ping @babielau (see previous comment) - let us know!

@babielau commented on March 31st 2016

It takes some time to clone the DB of our live Piwik instance and copy it into our Piwik development instance.

Or is there an easy way to just isolate one idSite (in our case idSite=1) and copy all its data into an new idSite in another Piwik instance (the new idSite should be =30 for example).

@babielau commented on November 25th 2016

@mattab: We executed the commands but it did not help. The exported statistics (from the GUI) and the diagrams are still not delivering consistent statistics (compared to the exported statistics from the API).

Any ideas?

@babielau commented on January 9th 2017

@mattab: Any news?

@mattab commented on January 9th 2017 Owner

Sorry we are not able to reproduce the issue without more information on how to reproduce... Does anyone else experience this issue?

@mattab commented on January 9th 2017 Owner

Fyi: if you need our professional support we can help, feel free to contact us at: http://piwik.org/support/

@mattab commented on June 19th 2017 Owner

Besides https://github.com/piwik/piwik/issues/9898 we are not aware of any more problem, and unfortunately can't reproduce. Would be great if you can send us access to your PIwik + steps to reproduce. Feel free to re-open the issue once you do this. Thanks!

This Issue was closed on June 19th 2017
Powered by GitHub Issue Mirror