I enabled the MYSQLI adapter in order to avail of the “load data infile” feature of MySql.
All worked fine but when running (either in cron every hour or as root on the command line)
/usr/bin/php5 /var/www/piwik/console core:archive --url=https://piwik.mysite >> /var/www/piwik/piwik-archive.log
no new data is detected, all websites are reported as
"Skipped website id XYZ as archiving is not needed"
I configured Piwik in the admin page with “Archive reports when viewed from the browser”: No
I am tracking 42 websites.
I removed the line "adapter = “MYSQLI” in my config file and reports are archived again.
I think it is a bug in core:archive when using mysqli
I updated mysqlnd and it solved the issue of load data infile not working with PDO.
apt-get install php5-mysqlnd
apt-get gave me a message saying that this PPA is deprecated but for the time being I switched back to PDO and I can have faster archiving with local data infile and correct behaviour with new data so my problem is solved.
I still believe that core:archive should be checked since it does not work properly when using MYSQLI
It was my mistake, this report is not accurate, archiver works fine both with MYSQLI and PDO.
The problem is that my code that generates the tracking events was formatting dates in 12-hours format without the AM/PM indication, as a consequence all events were tracked in the morning. This resulted in the archiver tool reporting new visits in the morning but not in the afternoon tricking me into believing it was due to my changes in DB adapter!!!