After having used piwik successfully for about a year now, we decided to set cron to manage the archiving of reports instead of on user visit. We’ve got around 100 sites with fairly low traffic; although a number may reach 100 hits a day; small potatoes in comparison to some of the posters on this forum. We did this prior to the 1.6 upgrade and it seemed to be quite successful.
We run PHP 5.3.x via Apache 2/mod_fcgid on a Debian server and it works really well. We made some tweaks to ensure that the archive process ran successfully (details in this gist) by removing limits on execution time in php.ini and in the httpd vhost configuration.
After a few days we noticed that February’s data was set at 0 for 25% of our sites. I manually ran archive.php and it was still 0 until i ran with the --force-all-sites flag. This repeated the following day, and so on, for the last 7 days. We have since upgraded to 1.7 in the hope that it may resolve the issue, but 'twas of little or no avail.
Does anyone have any idea? I have since started logrotating so that I can try and spot any errors in the logs but haven’t found any evidence of errors.
[quote=matt]
Please run the archive.php with --force-all-websites --force-all-periods=8640000
does it archive the missing months?[/quote]
Just --force-all-websites is enough. At the moment, I’m manually running it with --force-all-websites each morning. And each morning afterwards, the data disappears and I start again with --force-all-websites.
I’ve indulged you and done it with the additional --force-all-periods and it, too, has recovered the February data. Unfortunately, I’ll have to wait until tomorrow to see if it has permanently rectified the issue
This has improved matters significantly. From 50% of our sites to 10%. I’ll wait for the last cron job of the day before I uncork the champagne and rebuild the last 10%. Thanks for your help so far!
But, it should fix the problem in all cases. So, if you still see websites with no data (tomorrow, after at least 24 h after applying patch) then please let meknow as we would want to fix it in all cases
Perhaps, but the archive.php should also force to archive all websites at least once a day, when the day finishes in their timezone, it should trigger full archiving for these websites. Please keep reporting if you have bugs, we would have to investigate further to make sure it’s fixed!
We still have plenty of sites displaying 0 data for the month despite having logged plenty of hits. We are having to force all sites on a daily basis right now which isn’t really a problem as I could just cron it anyway but I’d much prefer a less aggressive measure
The bug is my queue but it’s very long queue right now. I will take a look in the next 2 weeks for sure. stay tuned, it’s good that you have a work around in the meantime
i experienced the same bug lately, and even if i can’t add any significant information to the above said, it seems that only current year, month, week, and day are not processed properly.