Thank you for your response. How is archiving related to this? I don’t recall having to set up archiving on the hosted environment and it all just worked.
Anyway, I tried the web cron archive method. The data is pretty much static at this point, so there should be no need to archive more than once, right? It resulted in this:
INFO CoreAdminHome[2016-03-03 06:53:38] [8ff1c] --------------------------- INFO CoreAdminHome[2016-03-03 06:53:38] [8ff1c] INIT INFO CoreAdminHome[2016-03-03 06:53:38] [8ff1c] Running Piwik 2.14.2 as Super User INFO CoreAdminHome[2016-03-03 06:53:38] [8ff1c] --------------------------- INFO CoreAdminHome[2016-03-03 06:53:38] [8ff1c] NOTES INFO CoreAdminHome[2016-03-03 06:53:38] [8ff1c] - If you execute this script at least once per hour (or more often) in a crontab, you may disable 'Browser trigger archiving' in Piwik UI > Settings > General Settings. INFO CoreAdminHome[2016-03-03 06:53:38] [8ff1c] See the doc at: http://piwik.org/docs/setup-auto-archiving/ INFO CoreAdminHome[2016-03-03 06:53:38] [8ff1c] - Reports for today will be processed at most every 150 seconds. You can change this value in Piwik UI > Settings > General Settings. INFO CoreAdminHome[2016-03-03 06:53:38] [8ff1c] - Reports for the current week/month/year will be refreshed at most every 3600 seconds. INFO CoreAdminHome[2016-03-03 06:53:38] [8ff1c] - Will process 4 websites with new visits since 7 days 0 hours , IDs: 11, 51, 61, 91 INFO CoreAdminHome[2016-03-03 06:53:38] [8ff1c] - Will process 4 other websites because some old data reports have been invalidated (eg. using the Log Import script) , IDs: 21, 41, 11, 91 INFO CoreAdminHome[2016-03-03 06:53:38] [8ff1c] --------------------------- INFO CoreAdminHome[2016-03-03 06:53:38] [8ff1c] START INFO CoreAdminHome[2016-03-03 06:53:38] [8ff1c] Starting Piwik reports archiving... INFO CoreAdminHome[2016-03-03 06:53:38] [8ff1c] Will pre-process for website id = 11, period = day, date = last52 INFO CoreAdminHome[2016-03-03 06:53:38] [8ff1c] - pre-processing all visits ERROR CoreAdminHome[2016-03-03 06:53:39] [8ff1c] Got invalid response from API request: ?module=API&method=API.get&idSite=11&period=day&date=last52&format=php&trigger=archivephp. Response was 'a:2:{s:6:"result";s:5:"error";s:7:"message";s:63:"SQLSTATE[HY000]: General error: 2006 MySQL server has gone away";}' ERROR CoreAdminHome[2016-03-03 06:53:39] [8ff1c] Empty or invalid response '' for website id 11, Time elapsed: 0.797s, skipping INFO CoreAdminHome[2016-03-03 06:53:39] [8ff1c] Will pre-process for website id = 51, period = day, date = last52 INFO CoreAdminHome[2016-03-03 06:53:39] [8ff1c] - pre-processing all visits ERROR CoreAdminHome[2016-03-03 06:53:39] [8ff1c] Got invalid response from API request: ?module=API&method=API.get&idSite=51&period=day&date=last52&format=php&trigger=archivephp. Response was 'a:2:{s:6:"result";s:5:"error";s:7:"message";s:63:"SQLSTATE[HY000]: General error: 2006 MySQL server has gone away";}' ERROR CoreAdminHome[2016-03-03 06:53:39] [8ff1c] Empty or invalid response '' for website id 51, Time elapsed: 0.336s, skipping INFO CoreAdminHome[2016-03-03 06:53:39] [8ff1c] Will pre-process for website id = 61, period = day, date = last52 INFO CoreAdminHome[2016-03-03 06:53:39] [8ff1c] - pre-processing all visits ERROR CoreAdminHome[2016-03-03 06:53:40] [8ff1c] Got invalid response from API request: ?module=API&method=API.get&idSite=61&period=day&date=last52&format=php&trigger=archivephp. Response was 'a:2:{s:6:"result";s:5:"error";s:7:"message";s:63:"SQLSTATE[HY000]: General error: 2006 MySQL server has gone away";}' ERROR CoreAdminHome[2016-03-03 06:53:40] [8ff1c] Empty or invalid response '' for website id 61, Time elapsed: 0.331s, skipping INFO CoreAdminHome[2016-03-03 06:53:40] [8ff1c] Will pre-process for website id = 91, period = day, date = last52 INFO CoreAdminHome[2016-03-03 06:53:40] [8ff1c] - pre-processing all visits ERROR CoreAdminHome[2016-03-03 06:53:40] [8ff1c] Got invalid response from API request: ?module=API&method=API.get&idSite=91&period=day&date=last52&format=php&trigger=archivephp. Response was 'a:2:{s:6:"result";s:5:"error";s:7:"message";s:63:"SQLSTATE[HY000]: General error: 2006 MySQL server has gone away";}' ERROR CoreAdminHome[2016-03-03 06:53:40] [8ff1c] Empty or invalid response '' for website id 91, Time elapsed: 0.364s, skipping INFO CoreAdminHome[2016-03-03 06:53:40] [8ff1c] Will pre-process for website id = 21, period = day, date = last52 INFO CoreAdminHome[2016-03-03 06:53:40] [8ff1c] - pre-processing all visits INFO CoreAdminHome[2016-03-03 06:53:42] [8ff1c] Archived website id = 21, period = day, 0 segments, 0 visits in last last52 days, 0 visits today, Time elapsed: 0.002s INFO CoreAdminHome[2016-03-03 06:53:42] [8ff1c] Will pre-process for website id = 21, period = week, date = last220 INFO CoreAdminHome[2016-03-03 06:53:42] [8ff1c] - pre-processing all visits ERROR CoreAdminHome[2016-03-03 06:53:42] [8ff1c] Got invalid response from API request: ?module=API&method=API.get&idSite=21&period=week&date=last220&format=php&trigger=archivephp. Response was 'a:2:{s:6:"result";s:5:"error";s:7:"message";s:63:"SQLSTATE[HY000]: General error: 2006 MySQL server has gone away";}' INFO CoreAdminHome[2016-03-03 06:53:42] [8ff1c] Archived website id = 21, period = week, 0 segments, 0 visits in last last220 weeks, 0 visits this week, Time elapsed: 0.368s INFO CoreAdminHome[2016-03-03 06:53:42] [8ff1c] Will pre-process for website id = 21, period = month, date = last52 INFO CoreAdminHome[2016-03-03 06:53:42] [8ff1c] - pre-processing all visits ERROR CoreAdminHome[2016-03-03 06:53:43] [8ff1c] Got invalid response from API request: ?module=API&method=API.get&idSite=21&period=month&date=last52&format=php&trigger=archivephp. Response was 'a:2:{s:6:"result";s:5:"error";s:7:"message";s:63:"SQLSTATE[HY000]: General error: 2006 MySQL server has gone away";}' INFO CoreAdminHome[2016-03-03 06:53:43] [8ff1c] Archived website id = 21, period = month, 0 segments, 0 visits in last last52 months, 0 visits this month, Time elapsed: 0.332s INFO CoreAdminHome[2016-03-03 06:53:43] [8ff1c] Will pre-process for website id = 21, period = year, date = last7 INFO CoreAdminHome[2016-03-03 06:53:43] [8ff1c] - pre-processing all visits ERROR CoreAdminHome[2016-03-03 06:53:43] [8ff1c] Got invalid response from API request: ?module=API&method=API.get&idSite=21&period=year&date=last7&format=php&trigger=archivephp. Response was 'a:2:{s:6:"result";s:5:"error";s:7:"message";s:63:"SQLSTATE[HY000]: General error: 2006 MySQL server has gone away";}' INFO CoreAdminHome[2016-03-03 06:53:43] [8ff1c] Archived website id = 21, period = year, 0 segments, 0 visits in last last7 years, 0 visits this year, Time elapsed: 0.344s INFO CoreAdminHome[2016-03-03 06:53:43] [8ff1c] Archived website id = 21, 4 API requests, Time elapsed: 3.114s [5/6 done] INFO CoreAdminHome[2016-03-03 06:53:43] [8ff1c] Will pre-process for website id = 41, period = day, date = last52 INFO CoreAdminHome[2016-03-03 06:53:43] [8ff1c] - pre-processing all visits INFO CoreAdminHome[2016-03-03 06:53:45] [8ff1c] Archived website id = 41, period = day, 0 segments, 0 visits in last last52 days, 0 visits today, Time elapsed: 0.001s INFO CoreAdminHome[2016-03-03 06:53:45] [8ff1c] Will pre-process for website id = 41, period = week, date = last219 INFO CoreAdminHome[2016-03-03 06:53:45] [8ff1c] - pre-processing all visits ERROR CoreAdminHome[2016-03-03 06:53:46] [8ff1c] Got invalid response from API request: ?module=API&method=API.get&idSite=41&period=week&date=last219&format=php&trigger=archivephp. Response was 'a:2:{s:6:"result";s:5:"error";s:7:"message";s:63:"SQLSTATE[HY000]: General error: 2006 MySQL server has gone away";}' INFO CoreAdminHome[2016-03-03 06:53:46] [8ff1c] Archived website id = 41, period = week, 0 segments, 0 visits in last last219 weeks, 0 visits this week, Time elapsed: 0.340s INFO CoreAdminHome[2016-03-03 06:53:46] [8ff1c] Will pre-process for website id = 41, period = month, date = last52 INFO CoreAdminHome[2016-03-03 06:53:46] [8ff1c] - pre-processing all visits ERROR CoreAdminHome[2016-03-03 06:53:46] [8ff1c] Got invalid response from API request: ?module=API&method=API.get&idSite=41&period=month&date=last52&format=php&trigger=archivephp. Response was 'a:2:{s:6:"result";s:5:"error";s:7:"message";s:63:"SQLSTATE[HY000]: General error: 2006 MySQL server has gone away";}' INFO CoreAdminHome[2016-03-03 06:53:46] [8ff1c] Archived website id = 41, period = month, 0 segments, 0 visits in last last52 months, 0 visits this month, Time elapsed: 0.338s INFO CoreAdminHome[2016-03-03 06:53:46] [8ff1c] Will pre-process for website id = 41, period = year, date = last7 INFO CoreAdminHome[2016-03-03 06:53:46] [8ff1c] - pre-processing all visits ERROR CoreAdminHome[2016-03-03 06:53:46] [8ff1c] Got invalid response from API request: ?module=API&method=API.get&idSite=41&period=year&date=last7&format=php&trigger=archivephp. Response was 'a:2:{s:6:"result";s:5:"error";s:7:"message";s:63:"SQLSTATE[HY000]: General error: 2006 MySQL server has gone away";}' INFO CoreAdminHome[2016-03-03 06:53:46] [8ff1c] Archived website id = 41, period = year, 0 segments, 0 visits in last last7 years, 0 visits this year, Time elapsed: 0.332s INFO CoreAdminHome[2016-03-03 06:53:46] [8ff1c] Archived website id = 41, 4 API requests, Time elapsed: 3.278s [6/6 done] INFO CoreAdminHome[2016-03-03 06:53:46] [8ff1c] Done archiving! INFO CoreAdminHome[2016-03-03 06:53:46] [8ff1c] --------------------------- INFO CoreAdminHome[2016-03-03 06:53:46] [8ff1c] SUMMARY INFO CoreAdminHome[2016-03-03 06:53:46] [8ff1c] Total visits for today across archived websites: 0 INFO CoreAdminHome[2016-03-03 06:53:46] [8ff1c] Archived today's reports for 2 websites INFO CoreAdminHome[2016-03-03 06:53:46] [8ff1c] Archived week/month/year for 2 websites INFO CoreAdminHome[2016-03-03 06:53:46] [8ff1c] Skipped 7 websites: no new visit since the last script execution INFO CoreAdminHome[2016-03-03 06:53:46] [8ff1c] Skipped 0 websites day archiving: existing daily reports are less than 150 seconds old INFO CoreAdminHome[2016-03-03 06:53:46] [8ff1c] Skipped 0 websites week/month/year archiving: existing periods reports are less than 3600 seconds old INFO CoreAdminHome[2016-03-03 06:53:46] [8ff1c] Total API requests: 8 INFO CoreAdminHome[2016-03-03 06:53:46] [8ff1c] done: 2/6 33%, 0 vtoday, 2 wtoday, 2 wperiods, 8 req, 8221 ms, 14 errors. INFO CoreAdminHome[2016-03-03 06:53:46] [8ff1c] Time elapsed: 8.221s INFO CoreAdminHome[2016-03-03 06:53:46] [8ff1c] --------------------------- INFO CoreAdminHome[2016-03-03 06:53:46] [8ff1c] SCHEDULED TASKS INFO CoreAdminHome[2016-03-03 06:53:46] [8ff1c] Starting Scheduled tasks... INFO CoreAdminHome[2016-03-03 06:53:46] [8ff1c] Scheduler: executing task Piwik\Plugins\CoreAdminHome\Tasks.purgeOutdatedArchives... INFO CoreAdminHome[2016-03-03 06:53:46] [8ff1c] Purging archives in 16 archive tables. INFO CoreAdminHome[2016-03-03 06:53:46] [8ff1c] Deleted 2 rows in archive tables (numeric + blob) for 2015-01-15. INFO CoreAdminHome[2016-03-03 06:53:46] [8ff1c] Deleted 45 rows in archive tables (numeric + blob) for 2015-07-15. INFO CoreAdminHome[2016-03-03 06:53:46] [8ff1c] Deleted 52 rows in archive tables (numeric + blob) for 2016-01-15. INFO CoreAdminHome[2016-03-03 06:53:46] [8ff1c] Deleted 112 rows in archive tables (numeric + blob) for 2016-02-15. INFO CoreAdminHome[2016-03-03 06:53:46] [8ff1c] Scheduler: finished. Time elapsed: 0.070s INFO CoreAdminHome[2016-03-03 06:53:46] [8ff1c] Scheduler: executing task Piwik\Plugins\ExamplePlugin\Tasks.myTaskWithParam_anystring... INFO CoreAdminHome[2016-03-03 06:53:46] [8ff1c] Scheduler: finished. Time elapsed: 0.000s INFO CoreAdminHome[2016-03-03 06:53:46] [8ff1c] Scheduler: executing task Piwik\Plugins\ExamplePlugin\Tasks.myTask... INFO CoreAdminHome[2016-03-03 06:53:46] [8ff1c] Scheduler: finished. Time elapsed: 0.000s INFO CoreAdminHome[2016-03-03 06:53:46] [8ff1c] Scheduler: executing task Piwik\Plugins\UsersManager\Tasks.setUserDefaultReportPreference... INFO CoreAdminHome[2016-03-03 06:53:46] [8ff1c] Scheduler: finished. Time elapsed: 0.002s INFO CoreAdminHome[2016-03-03 06:53:46] [8ff1c] Scheduler: executing task Piwik\Plugins\CoreAdminHome\Tasks.purgeInvalidatedArchives... INFO CoreAdminHome[2016-03-03 06:53:47] [8ff1c] Scheduler: finished. Time elapsed: 0.066s INFO CoreAdminHome[2016-03-03 06:53:47] [8ff1c] Scheduler: executing task Piwik\Plugins\PrivacyManager\Tasks.deleteReportData... INFO CoreAdminHome[2016-03-03 06:53:47] [8ff1c] Scheduler: finished. Time elapsed: 0.002s INFO CoreAdminHome[2016-03-03 06:53:47] [8ff1c] Scheduler: executing task Piwik\Plugins\PrivacyManager\Tasks.deleteLogData... INFO CoreAdminHome[2016-03-03 06:53:47] [8ff1c] Scheduler: finished. Time elapsed: 0.001s INFO CoreAdminHome[2016-03-03 06:53:47] [8ff1c] Scheduler: executing task Piwik\Plugins\CorePluginsAdmin\Tasks.clearAllCacheEntries... INFO CoreAdminHome[2016-03-03 06:53:47] [8ff1c] Scheduler: finished. Time elapsed: 0.026s INFO CoreAdminHome[2016-03-03 06:53:47] [8ff1c] Scheduler: executing task Piwik\Plugins\CorePluginsAdmin\Tasks.sendNotificationIfUpdatesAvailable... INFO CoreAdminHome[2016-03-03 06:53:47] [8ff1c] Scheduler: finished. Time elapsed: 0.001s INFO CoreAdminHome[2016-03-03 06:53:47] [8ff1c] Scheduler: executing task Piwik\Plugins\CoreAdminHome\Tasks.optimizeArchiveTable... INFO CoreAdminHome[2016-03-03 06:53:47] [8ff1c] Scheduler: finished. Time elapsed: 0.015s INFO CoreAdminHome[2016-03-03 06:53:47] [8ff1c] Scheduler: executing task Piwik\Plugins\UserCountry\GeoIPAutoUpdater.update... INFO CoreAdminHome[2016-03-03 06:53:47] [8ff1c] Scheduler: finished. Time elapsed: 0.031s INFO CoreAdminHome[2016-03-03 06:53:47] [8ff1c] Scheduler: executing task Piwik\Plugins\CoreUpdater\Tasks.sendNotificationIfUpdateAvailable... INFO CoreAdminHome[2016-03-03 06:53:47] [8ff1c] Scheduler: finished. Time elapsed: 0.004s INFO CoreAdminHome[2016-03-03 06:53:47] [8ff1c] done INFO CoreAdminHome[2016-03-03 06:53:47] [8ff1c] --------------------------- INFO CoreAdminHome[2016-03-03 06:53:47] [8ff1c] --------------------------- INFO CoreAdminHome[2016-03-03 06:53:47] [8ff1c] SUMMARY OF ERRORS INFO CoreAdminHome[2016-03-03 06:53:47] [8ff1c] Error: Got invalid response from API request: ?module=API&method=API.get&idSite=11&period=day&date=last52&format=php&trigger=archivephp. Response was 'a:2:{s:6:"result";s:5:"error";s:7:"message";s:63:"SQLSTATE[HY000]: General error: 2006 MySQL server has gone away";}' INFO CoreAdminHome[2016-03-03 06:53:47] [8ff1c] Error: Empty or invalid response '' for website id 11, Time elapsed: 0.797s, skipping INFO CoreAdminHome[2016-03-03 06:53:47] [8ff1c] Error: Got invalid response from API request: ?module=API&method=API.get&idSite=51&period=day&date=last52&format=php&trigger=archivephp. Response was 'a:2:{s:6:"result";s:5:"error";s:7:"message";s:63:"SQLSTATE[HY000]: General error: 2006 MySQL server has gone away";}' INFO CoreAdminHome[2016-03-03 06:53:47] [8ff1c] Error: Empty or invalid response '' for website id 51, Time elapsed: 0.336s, skipping INFO CoreAdminHome[2016-03-03 06:53:47] [8ff1c] Error: Got invalid response from API request: ?module=API&method=API.get&idSite=61&period=day&date=last52&format=php&trigger=archivephp. Response was 'a:2:{s:6:"result";s:5:"error";s:7:"message";s:63:"SQLSTATE[HY000]: General error: 2006 MySQL server has gone away";}' INFO CoreAdminHome[2016-03-03 06:53:47] [8ff1c] Error: Empty or invalid response '' for website id 61, Time elapsed: 0.331s, skipping INFO CoreAdminHome[2016-03-03 06:53:47] [8ff1c] Error: Got invalid response from API request: ?module=API&method=API.get&idSite=91&period=day&date=last52&format=php&trigger=archivephp. Response was 'a:2:{s:6:"result";s:5:"error";s:7:"message";s:63:"SQLSTATE[HY000]: General error: 2006 MySQL server has gone away";}' INFO CoreAdminHome[2016-03-03 06:53:47] [8ff1c] Error: Empty or invalid response '' for website id 91, Time elapsed: 0.364s, skipping INFO CoreAdminHome[2016-03-03 06:53:47] [8ff1c] Error: Got invalid response from API request: ?module=API&method=API.get&idSite=21&period=week&date=last220&format=php&trigger=archivephp. Response was 'a:2:{s:6:"result";s:5:"error";s:7:"message";s:63:"SQLSTATE[HY000]: General error: 2006 MySQL server has gone away";}' INFO CoreAdminHome[2016-03-03 06:53:47] [8ff1c] Error: Got invalid response from API request: ?module=API&method=API.get&idSite=21&period=month&date=last52&format=php&trigger=archivephp. Response was 'a:2:{s:6:"result";s:5:"error";s:7:"message";s:63:"SQLSTATE[HY000]: General error: 2006 MySQL server has gone away";}' INFO CoreAdminHome[2016-03-03 06:53:47] [8ff1c] Error: Got invalid response from API request: ?module=API&method=API.get&idSite=21&period=year&date=last7&format=php&trigger=archivephp. Response was 'a:2:{s:6:"result";s:5:"error";s:7:"message";s:63:"SQLSTATE[HY000]: General error: 2006 MySQL server has gone away";}' INFO CoreAdminHome[2016-03-03 06:53:47] [8ff1c] Error: Got invalid response from API request: ?module=API&method=API.get&idSite=41&period=week&date=last219&format=php&trigger=archivephp. Response was 'a:2:{s:6:"result";s:5:"error";s:7:"message";s:63:"SQLSTATE[HY000]: General error: 2006 MySQL server has gone away";}' INFO CoreAdminHome[2016-03-03 06:53:47] [8ff1c] Error: Got invalid response from API request: ?module=API&method=API.get&idSite=41&period=month&date=last52&format=php&trigger=archivephp. Response was 'a:2:{s:6:"result";s:5:"error";s:7:"message";s:63:"SQLSTATE[HY000]: General error: 2006 MySQL server has gone away";}' INFO CoreAdminHome[2016-03-03 06:53:47] [8ff1c] Error: Got invalid response from API request: ?module=API&method=API.get&idSite=41&period=year&date=last7&format=php&trigger=archivephp. Response was 'a:2:{s:6:"result";s:5:"error";s:7:"message";s:63:"SQLSTATE[HY000]: General error: 2006 MySQL server has gone away";}' ERROR CoreAdminHome[2016-03-03 06:53:47] [8ff1c] 14 total errors during this script execution, please investigate and try and fix these errors. Error: 14 total errors during this script execution, please investigate and try and fix these errors.
What MySQL settings would have to be tweaked?
Or, more interesting: where did I go wrong? I simply installed PHP 7.0.0 from the Microsoft Web Platform Installer and MySQL 5.7.11 Community Server from the Oracle installer. I didn’t change any of the default settings. Then I downloaded a full dump of the Piwik data from my host (basically, a large file with INSERT INTO statements) and imported that into my local MySQL database. In IIS, I made a virtual directory and converted that to an application, and placed the a copy of the production Piwik files in there after changing the Piwik database settings.
Just to be clear: this is running on my local machine. There’s no need to gather statistics, only to view them.