@eramirezprotec opened this Issue on November 6th 2017 Contributor

Hi! One of my websites has the Canary timezone. It was working great until the time change from summer to winter time. When this happened, all the data shows perfectly until the beginning of the next day, at that moment all metrics and reports from the day before are set to zero in all widgets.

In summary: the current day shows all reports and metrics correctly. When the next day starts, all data from the day before is set to zero. And Piwik keeps this behavior every day.

I checked the database (piwik_archive_numeric_2017_XX) and I believe that Piwik is building the last archive of the day without calculating any metric or report, so, it says “done” and it’s set to 1 (definitive, not temporarily or invalid or with errors) but there is nothing calculated at that moment.

My workaround has been to set the “done” register to 2 or 4 and force Piwik to archive the site for that day. But obviously, there has to be a better way to solve this issue.

I'll show images from today (2017-11-06) and yesterday (2017-11-05):






This is the query made to get the results from the last image: _select * from piwik_archive_numeric_2017_11 where idsite=22 and period=1 and date1='2017-11-05' and date2='2017-11-05' order by tsarchived desc;

@eramirezprotec commented on November 21st 2017 Contributor

@sgiehl this keeps happening every day... am I the only one who has reported this issue? I saw a few tickets mentioning something similar, but they are all marked as "solved". This is a constant problem in my Piwik installation, there has to be a bug somewhere. I can give you access to the server and DB.

@sgiehl commented on November 21st 2017 Member

So if that happens "every day" it seems not to be an time zone issue, right? Are you using browser archiving or do you have set up a cron to archive?

@eramirezprotec commented on November 21st 2017 Contributor

I say that it could be some issue related to the timezone because it started happening when the time changed from summer to winter time. I am using a cron to archive.

@eramirezprotec commented on January 18th 2018 Contributor

@sgiehl This is still happening. The curious thing is that all metrics and reports go to zero at the end of the day except my own. I have a few plugins that calculate new metrics and reports. Those metrics and reports get aggregated and archived and Matomo shows them correctly.

I don't do anything special in my plugins, I just use the Archiver class and its two methods: aggregateDayReport and aggregateMultipleReports; inside those methods, I do some queries and calculate the metrics and reports values. Then, I use insertBlobRecord and insertNumericRecords.

Is this information helpful? Is there a chance that my plugins are interfering with Matomo normal archiving process?

Important: The problem is not happening every day, it happens once a week on a random day. No pattern is being followed, at least not one that I know about.

Thank you very much for your help.

@sgiehl commented on January 18th 2018 Member

Does everything work correctly when you disable your plugin?
Is the archiver of your plugin triggered within the normal archiving process, or do you trigger it within a cron or similar?

@tsteur commented on January 18th 2018 Owner

if it started happening since summer/winter time it could be a possible timezone issue. Would it be possible that you set the timezone just for a while to the corresponding UTC+/-X hours entry?

Powered by GitHub Issue Mirror