CRON job not working well since 1.8.2 update?


#1

I’m seeing some errors in the CRON report generation since updating from 1.6 to 1.8.2.

Some sites have 0 visits on the reports pages (although I can see they have received visitors in the Visitor Log). Other site have the incorrect amount of visitors.

So far I have tried the following:

  • Removing piwik_archive_* tables.
  • Forcing report generation for all sites, with the command:

 php /var/www/html/piwik/misc/cron/archive.php --url=http://piwik.mysite.com --force-all-websites --force-all-periods=157784630

When this is run, I get a bunch of these errors, unsure if relevant to the problem:


PHP Notice:  Undefined property: Archiving::$idSitesInvalidatedOldReports in /var/www/html/piwik/misc/cron/archive.php on line 236
PHP Warning:  in_array() expects parameter 2 to be array, null given in /var/www/html/piwik/misc/cron/archive.php on line 236

The report generation completes:


[2012-06-20 20:30:04] [6cb643e8] done: 19/19 100%, 91 v, 19 wtoday, 19 wperiods, 76 req, 44185 ms, no error

…but still the numbers in the report is incorrect (sometimes 0, sometimes just fewer than should be.)

If I activate “Allow Piwik archiving to trigger when reports are viewed from the browser”, everything is counted and displayed correctly in the reports.

Any ideas?


(Matthieu Aubry) #2

See bug report in Undefined property: Archiving::$idSitesInvalidatedOldReports in misc/cron/archive.php on line 236 · Issue #3218 · matomo-org/matomo · GitHub

please try this patch http://dev.piwik.org/trac/changeset/6487


#3

[quote=matt]
See bug report in Undefined property: Archiving::$idSitesInvalidatedOldReports in misc/cron/archive.php on line 236 · Issue #3218 · matomo-org/matomo · GitHub

please try this patch http://dev.piwik.org/trac/changeset/6487[/quote]

Upon quick inspection this seems to have solved the issue. (:P)

I will test it for a few days and let you know if the problem appears again.


#4

Thx for the patch Matt, I also confirm it fixed the issue in my case.

Greetings,
Manuel