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
Missing metrics and reports #12251
Comments
@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. |
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? |
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. |
@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. |
Does everything work correctly when you disable your plugin? |
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? |
@tsteur, setting the timezone to the corresponding UTC+/-X hours entry didn't work. I ended up creating a plugin that detects the "metrics and reports to zero" problem and invalidates all the archived stuff for that period and date. That way everything is recalculated when the archiving process runs again. Thank you for your help, I hope we can find a real solution in the future. For now, this is a workaround. |
@eramirezprotec thanks for letting me know re timezone. It would be good indeed to find a real solution. Those things are hard to find out. I don't think I've ever heard of a similar problem so wondering if it might be memory related or so but it seems to work when you invalidate and recalculate so this shouldn't be the problem. Did you find anything in the web server logs? I think so far there are only entries from Matomo log. |
@voarsh try to check the logs to see if some error happened. If it didn't, try to remember if you installed (or created) some plugin lately. If none of these scenarios happened, you can be suffering from the same thing that happens to me. If you need to "solve it" by yourself, this is what you have to do:
|
Hi @eramirezprotec - i just noticed your old comment "I ended up creating a plugin that detects the "metrics and reports to zero" problem and invalidates all the archived stuff for that period and date. That way everything is recalculated when the archiving process runs again. " - this sounds interesting and something we might need in general in Matomo. Would you maybe be able to share the code in case you still run this? cc @diosmosis @tsteur it would be helpful to have a command that automatically detects and invalidates "zero data" days/weeks/months. eg. on cloud this could proactively solve some issues before customers face them. refs L3-11, L3-46 etc |
Hi, @mattab. Since your comment, I spoke with my supervisor and we are trying to get the corresponding permission to share this code with you. I'm sorry about the delay. I will let you know as soon as I get an answer. |
Thanks for your patience with this issue. We believe this has been resolved in the recent updates of Matomo. To ensure you have the fix, please update to the latest version of Matomo. If the issue persists after the update, don't hesitate to reopen this issue and let us know. Cheers! |
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 ts_archived desc;
The text was updated successfully, but these errors were encountered: