Piwik cron: Every hour or every day?

Hi,

the sample crontab entries are misleading:

http:// piwik.org /docs/setup-auto-archiving/

5 * * * * www-data /path/to/piwik/misc/cron/archive.sh > /dev/null
 5 0 * * * /path/to/piwik/misc/cron/archive.sh > /dev/null

How often do you suggest to run the archive task? How does the setting “Reports for today will be processed at most every” relate to the cron interval?

Christophe

1 Like

Thanks for feedback I updated the doc (we recommend to run hourly).

You are also right pointing out that technically, if users follow the doc, they shouldn’t: disable browser archiving + set a delay less than 1 hour to process reports. I’ll add a message in the product when this happens (Disable browser archiving and process reports every X (X less than 1 hour) will fail · Issue #1362 · matomo-org/matomo · GitHub )

ROFL, my archiving run (with 6k sites) runs for two hours already.
I’m still wondering why its doing that lot of queries for a couple of views per site.

So when I want to run the cron job daily I need to set the delay to 86400? I don’t want the generation of statistics to interfere with daily business.

And is it possible to set the default date range to “last week”?

Best regards
Christophe

Subscribing to topic. Couldn’t find another way to do so besides replying.

[quote=Thomas Seifert @ May 17 2010, 07:39 AM]ROFL, my archiving run (with 6k sites) runs for two hours already.
I’m still wondering why its doing that lot of queries for a couple of views per site.[/quote]

Can you please enable mysql slow query logging and report here, any slow query that might be executed during your archiving with 6k websites? This is an interesting use case and we haven’t yet made performance tests.

correct

Its not slow queries. Its just an awful lot of queries. When looking at the real time stats its running most of the time with more than 500 queries / second. See the aggregated stats attached.

[attachment=1271:Bildschi…11.14.06.png]

[quote=Thomas Seifert @ May 18 2010, 09:17 AM]Its not slow queries. Its just an awful lot of queries. When looking at the real time stats its running most of the time with more than 500 queries / second. See the aggregated stats attached.

[attachment=1271:Bildschi…11.14.06.png][/quote]

Technically piwik should only make one query per website if they don’t have any traffic. If they have at least one visit, indeed, there are many queries per website, this is expected.

Is piwik on a dedicated server? What is the total traffic of all websites, when archiving takes 2 hours?

thanks!