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

hasVisits - timezone problem - some sites not archived - no new tracking data for website id XY (between 2016-04-01 22:00:00 and 2015-04-02 01:36:19) #10031

Closed
skleiber opened this issue Apr 11, 2016 · 3 comments
Labels
Bug For errors / faults / flaws / inconsistencies etc. duplicate For issues that already existed in our issue tracker and were reported previously. Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical. Waiting for user feedback Indicates the Matomo team is waiting for feedback from the author or other users.
Milestone

Comments

@skleiber
Copy link

Since 2015-11 or around Piwik 2.15 i noticed, that some sites were not archived for days, sometimes for weeks. In the archiving reports i get my email, i can see the information from the hasVisits-check in core/CronArchive.php that sites have been skipped ... for example:

"no new tracking data for website id XY (between 2016-04-01 22:00:00 and 2015-04-02 01:36:19) - Skipped website id XY as archiving is not needed"

core/CronArchive.php

if ($hasVisits) {
        $this->logger->info("- tracking data found for website id $idSite (between $from and $to)");
    } else {
        $this->logger->info("- no new tracking data for website id $idSite (between $from and $to)");
    }

The hasVisits-check should test, if there were new visits for a specific site the day before; if yes do archiving, if not skip this site. Therefore it should check:
day before (2016-04-01) in the period from 00:00 to 23.59.

So the message aboves shows, that the actually used test period
2016-04-01 22:00:00 to 2015-04-02 01:36:19 (cronjob starts 01.30)
differs from the expected period, which would be
2016-04-01 00:00:00 to 2015-04-02 01:36:19 (cronjob starts 01.30)

This is on a server with Europe/Berlin timezone settings, so i have UTC+1h in winter and UTC+2h in summer, see here: http://www.timeanddate.com/time/zone/germany/berlin

With low traffic sites this goes on unitil the first visitor arrives someday between 22:00 and 23:59.
This made this behaviour quite erratic.

Possible solutions:

  • change my timezone settings in Piwik backend (per site, global) to London ... but this would change the tracking data
  • change core/CronArchive.php ... but this would be overwritten with every update

This behaviour could probably occur in any piwik instance with low traffic sites with deviant timezone settings.

Any hints how to fix this are welcome.

Best regards
Stephan

@mattab mattab added Bug For errors / faults / flaws / inconsistencies etc. Waiting for user feedback Indicates the Matomo team is waiting for feedback from the author or other users. labels Apr 11, 2016
@mattab mattab added this to the 2.16.2 milestone Apr 11, 2016
@mattab mattab added the Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical. label Apr 11, 2016
@mattab mattab modified the milestones: 2.16.x (LTS), 2.16.2 Apr 11, 2016
@mattab
Copy link
Member

mattab commented Apr 11, 2016

Hi Stephan, thank you for the report!

This looks like a major bug indeed. Maybe an upgade to 2.16.1 helps this issue? We recently fixed such issue in Piwik (in #9468 #10022 - see #8436 (comment) )

if you still experience after 2.16.1 let us know, we shall investigate further.

@skleiber
Copy link
Author

Last night all data has been archived, no site has been skipped.
It seem that the update to 2.16.1 has fixed this issue.
Thanks for your great support!

@mattab mattab added the duplicate For issues that already existed in our issue tracker and were reported previously. label Apr 12, 2016
@mattab mattab closed this as completed Apr 12, 2016
@mattab
Copy link
Member

mattab commented Apr 12, 2016

Great to hear 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. duplicate For issues that already existed in our issue tracker and were reported previously. Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical. Waiting for user feedback Indicates the Matomo team is waiting for feedback from the author or other users.
Projects
None yet
Development

No branches or pull requests

2 participants