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

core:archive doesn't produce hourly archives #5043

Closed
anonymous-matomo-user opened this issue Apr 25, 2014 · 6 comments
Closed

core:archive doesn't produce hourly archives #5043

anonymous-matomo-user opened this issue Apr 25, 2014 · 6 comments
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Milestone

Comments

@anonymous-matomo-user
Copy link

php5 /var/www/mypiwik/piwik/misc/cron/archive.php --url=http://mypiwik

behaves different than

php5 /var/www/mypiwik/piwik/console core:archive --url=http://mypiwik

The old one does archive both log imported invalidated sites + js tracked sited.

The new one always returns below for js tracked sites

Will process 0 websites with new visits since 59 min 26s

Except for the first run on a new day when doing daily archives. Based on the --help

Help:
 * It is recommended to run the script with the option --piwik-domain=[piwik-server-url] only. Other options are not required.
 * This script should be executed every hour via crontab, or as a daemon.

I would expect it's not necessary specify --force-all-periods parameter.

Piwik 2.2.0

@mattab
Copy link
Member

mattab commented Apr 27, 2014

Are you maybe running both at the same time? please try only use the new one, core:archive, and if you can copy paste the output for one full day (do you run the log hourly?)

@anonymous-matomo-user
Copy link
Author

Yes, I run it hourly from cron. I do run only one at the time, once migrated to 2.2.0 I switched to core:archive and noticed after couple of days it does only daily archives.

Every hour it returned following:

INFO CoreConsole[2014-04-24 07:23:08] [a7c06] - Archiving was last executed without error 59 min 42s ago
INFO CoreConsole[2014-04-24 07:23:08] [a7c06] - Will process 0 websites with new visits since 59 min 42s 
INFO CoreConsole[2014-04-24 07:23:08] [a7c06] - Will process 2 other websites because some old data reports have been invalidated (eg. using the Log Import script
) , IDs: 3, 5

only at mignight it processed java script tracked sites because last archive was on the other day

INFO CoreConsole[2014-04-25 00:23:13] [71e3d] - Will process 0 websites with new visits since 59 min 50s 
INFO CoreConsole[2014-04-25 00:23:13] [71e3d] - Will process 2 other websites because some old data reports have been invalidated (eg. using the Log Import script) , IDs: 3, 5
INFO CoreConsole[2014-04-24 22:23:13] [71e3d] - Will process 2 other websites because the last time they were archived was on a different day (in the website's timezone) , IDs: 1, 4

no problem at all with archive.php ... another strange thing just noticed, coreconsole returns different times when it starts archive see below (notice 2 hours offset with START)

INFO CoreConsole[2014-04-25 17:23:09] [b4690] - Will process 1 other websites because some old data reports have been invalidated (eg. using the Log Import script
) , IDs: 3
INFO CoreConsole[2014-04-25 15:23:09] [b4690] ---------------------------
INFO CoreConsole[2014-04-25 15:23:09] [b4690] START

vs archive.php

INFO [2014-04-25 19:23:05] [f9bcf] - Will process 1 other websites because some old data reports have been invalidated (eg. using the Log Import script) , IDs: 3
INFO [2014-04-25 19:23:05] [f9bcf] ---------------------------
INFO [2014-04-25 19:23:05] [f9bcf] START

@mattab
Copy link
Member

mattab commented Apr 28, 2014

In 22e8a7a: Setting the default timezone to UTC in the core:archive script, refs #5043
This could potentially cause some big problems.

@mattab
Copy link
Member

mattab commented Apr 28, 2014

Ok thanks for the report, you actually pointed out directly to a bug which was not discovered until now: the console was not setting the timezone as UTC. can you try again with this patch and see if it works better?

@anonymous-matomo-user
Copy link
Author

Running the patch since this morning and so far it works correctly every hour, so I guess it's fixed now :)

@mattab
Copy link
Member

mattab commented Apr 30, 2014

Nice!

@anonymous-matomo-user anonymous-matomo-user added this to the 2.2.1 - Piwik 2.2.1 milestone Jul 8, 2014
sabl0r pushed a commit to sabl0r/piwik that referenced this issue Sep 23, 2014
This issue was closed.
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.
Projects
None yet
Development

No branches or pull requests

2 participants