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
Stats randomly revert to zero #3438
Comments
Attachment: Before visits |
Attachment: After 1 visit and the cronjob has been run again |
Do you still experience the issue? what value do you use in Settings> general settings > timeout ? try 3600 ? marking as works-for-me but I can reopen if you think there is a bug, because there might be. |
Hi, I have the same problem, and i have the last version of piwik. For site with regular visit, i have statistic on the month. But for site with fewer visit (one visit by week by example), the statistic is reset to zero for the month or the week. If i look at day level, or at year level, i can see visit, but at month or week level, visit will be set to zero. If i run archive.php with --force-all-websites and --force-all-periods, visit are correctly refresh. Timeout is set to 3600. How can i resolv this problem. Thanks |
Finally, years are set to zero too. So for site with fewer visit, i can look only day stat. |
please try with latest version from: http://builds.piwik.org/?C=N;O=D this bug should be fixed. reopen if you tsill experience issue and you are using 1.9.2-b3 or greater |
Hi, I have the last version of piwik 1.9.2. I always have this problem for fewer visit site. What information can i give you to find the problem. |
Just upgraded to the latest beta build. I'll be testing it over the next week or so. |
Yeah I'm still having this issue. A website with only 5 vists this week keeps reverting back to zero until I run a --force-all-websites and --force-all-periods archive. I'm on 1.9.3-b4 |
(In [7481]) I think this should fix #3438 because indeed there was a bug in the code. |
Sorry, I'm with the last 1.9.3-b4, with the last version of archive.php from the svn trunk, but i still have the problem. Site with no visit in the day, revert to zero at the night. |
I can confirm that I'm still having this issue as well. I'm using the svn archive.php with 1.9.3-b4 everything else If you want access to my Piwik install then just give me a heads up and I'll give you access |
It didnt show up here but I committed a fix in: [7481] Please try to grab the latest archive.php from SVN: https://github.com/piwik/piwik/blob/master/misc/cron/archive.php Then wait 24 hours and it should work OK! I leave the bug opened, but please close it if you find it's working for you since I think it is now fixed! thanks for your help testing |
Sorry, i already have the last file. If i redownload the file and make a diff
There is no difference with the version i have already downloaded and the current version. And unfortunately i still have the problem. But if i can give you something to help (sql dump, zip, log), ask me. |
What would be very help ful would be to store all archive.php output logs appended after another in the log file. To do so replace < with << in the cron line. Then, can you send the lines from the archive.php run that show that the website that had visits was still not re-processed when it should have been? Hope it's not too complicated. I would really like to understand and fix this bug! |
I'll change this in my cronjob later tonight. |
Attachment: Piwik Archive Log |
I attach the file. At 23:45, site have good stats, not this morning. I think the problem can from
but i'm not sure. If you want make a more verbose version to test, i can test it. |
@phoenix thanks that is very interesting. What timezones are your websites set to in piwik ? also can you check that your server is at the right datetime ? also check that the mysql server is at the same datetime as php server ? If all is good on your side i'll investigate further for sure, I'm really curious what the bug could be. |
Replying to matt:
I have only one server that contains all my website, piwik, and mysql database. This server is at UTC+0100 (Europe/Paris).
The Linux command
|
I've been logging the archive output, it doesn't show any errors. However I'm still needing to run the --force-all-websites --force-all-periods every now and then. It doesn't look like I'll be much help. I'm still in the same boat, a website will revert to zero but once it gets a visit it returns to what it should. |
I've found an error! See here! My stats have since been reverted to zero for all websites but one. I assume this error caused an issue? |
Also sorry, I got this as well but I assume thats meant to be there. This code I'm adding now did not appear when the code I posted above appeared. They happened on different archive attempts.
Its worth noting that I have Piwik set to NOT delete old visitor data or anything. Piwik doesn't delete anything from my database. |
Sorry, the problem come when process all web site at 23:05 in the log. As index.php contains Unfortunately I do not know enough about the internal of piwik to debug the problem by myself. The part that reset visit, in the log :
|
I think it might be the scheduled task Piwik_CoreAdminHome.purgeOutdatedArchives that would purge too much data, but I'm not sure. I haven't yet been able to reproduce the issue myself. Keep posting more info if you have! |
Thats weird, because I don't have purge old log data on. So it shouldn't actually be purging anything... |
I think I may have found what could be causing the problem. I tracked a few proxies using Piwik that generated a whole new URL each time they visited a different page so I was literally tracking thousands of different pages a day. I've since fixed this issue but my stats are still reverting, is there a way I can go through a change all the proxies's pages that start in browse.php to JUST browse.php so that there is alot less pages in Piwik? |
you could write a SQL query that will look for all pages in log_action containing browse.php? and delete these IDs from log_link_visit_action (delete these page views). sorry wont write SQL & test, but if you need help: http://piwik.org/consulting/ |
Sorry, but this issue appears to still be present. I've noticed the issue happens when it does its daily tasks which are as follows:
Could it be that it doesn't have sufficient MySQL privileges or there is something wrong with my MySQL installation? I'm running it on a cPanel server so it could be that cPanel is locking it down to much. Whats also interesting is that I've got Piwik set to delete nothing, I retain all data, but it still purges outdated archives? I assume this just means that it updates them or does it delete them? |
purgeOutdatedArchives should only remove the "partial" reports which were processed for "unfinished days". do you still experience the issue using Piwik 1.12-beta5 here: http://builds.piwik.org/piwik-1.12-b5.zip If so please re-open and thanks for your patience |
PHP Version: 5.2.17
I've noticed whilst running Piwik 1.9-b10 that after running a cronjob the current week/month for websites that haven't received a visit in sometime revert to zero.
Once the website gets a new visit they repopulate to what they should be, IE the stats for the week/month are no longer zero and populate to what they were before.
I've attached images explaining what I mean
The text was updated successfully, but these errors were encountered: