Auto Archiving Problem

Hi,

My Piwik installation works flawless when “enable_browser_archiving_triggering = 1”. But since we are going to use it in a big site with a lot of hits, we are planning to head the Auto-Archiving way for faster loading.

I followed the steps in piwik.org/docs/setup-auto-archiving/, but for debugging purposes I decreased all the timings. This is my changed configuration:

[General]
time_before_today_archive_considered_outdated = 10
enable_browser_archiving_triggering = 0

(crontab)

          • /var/www/html/misc/cron/archive.sh > /dev/null

(system)
mysql timezone = UTC
php timezone = UTC
linux timezone = UTC
All of them with the same time
PHP has a memory limit of 512M

archive.sh has 777 access (rwx)

The problem is that when looking at the dashboard or making an API call (/index.php?module=API&method=VisitsSummary.getVisits&idSite=1&period=day&date=last10&format=xml&token_auth=xxxx) rarely return today’s stats (if it does, next refresh returns empty field). It does always return yesterday’s stats, though.









3

But when I execute directly “# sh /var/www/html/misc/cron/archive.sh”, it does return today’s stats:



3
1

I thought maybe the crontab had problems, so I tried: “* * * * * /var/www/html/misc/cron/archive.sh > /dummyfile”, but it also produces the same previous results (includes today’s stats).

I’m using the latest version v0.5.4. I’ve read numerous posts but haven’t found anyone having similar issues.
Many thanks.

I know this is a bit confusing, but this is probably caused by your time_before_today_archive_considered_outdated being set to 10 seconds or something small?

when the archive is requested but was last processed 2min ago, if the time_before_today_archive_considered_outdated is 10 s, it will actually not load the “outdated” archive but instead display no data. This is probably a bug… I created a ticket: http://dev.piwik.org/trac/ticket/1150