Got invalid response from API request: http://***/piwik/index.php?module=API&method=API.get&idSite=5&period=day&date=last52&format=php&token_auth=20c77ed16e29173258c0e22802376a3f&trigger=archivephp. The response was empty.

When I am trying to do archiving my reports in windows system through CMD prompt through executing thye below comand:

C:\Program Files\PHP\v5.3
php.exe “C:\inetpub\wwwroot\piwik\console” core:archive --url=https://**/piwik/index.php/ > C:\Archive\piwik-archive-output.log

got the below error message:

INFO CoreConsole[2015-05-14 13:04:06] [d1a74] ---------------------------
INFO CoreConsole[2015-05-14 13:04:06] [d1a74] INIT
INFO CoreConsole[2015-05-14 13:04:06] [d1a74] Piwik is installed at: http://***/piwik/index.php/
INFO CoreConsole[2015-05-14 13:04:06] [d1a74] Running Piwik 2.9.1 as Super User
INFO CoreConsole[2015-05-14 13:04:08] [d1a74] ---------------------------
INFO CoreConsole[2015-05-14 13:04:08] [d1a74] NOTES
INFO CoreConsole[2015-05-14 13:04:08] [d1a74] - Reports for today will be processed at most every 3600 seconds. You can change this value in Piwik UI > Settings > General Settings.
INFO CoreConsole[2015-05-14 13:04:08] [d1a74] - Reports for the current week/month/year will be refreshed at most every 3600 seconds.
INFO CoreConsole[2015-05-14 13:04:14] [d1a74] - Will process 4 websites with new visits since 7 days 0 hours , IDs: 3, 5, 6, 9
INFO CoreConsole[2015-05-14 13:04:20] [d1a74] ---------------------------
INFO CoreConsole[2015-05-14 13:04:20] [d1a74] START
INFO CoreConsole[2015-05-14 13:04:20] [d1a74] Starting Piwik reports archiving…
INFO CoreConsole[2015-05-14 13:04:23] [d1a74] Skipped website id 3, already done 58 min 42s ago, Time elapsed: 2.566s

ERROR CoreConsole[2015-05-14 13:04:45] [d1a74] Got invalid response from API request: http://***/piwik/index.php?module=API&method=API.get&idSite=5&period=day&date=last52&format=php&token_auth=20c77ed16e29173258c0e22802376a3f&trigger=archivephp. The response was empty. This usually means a server error. This solution to this error is generally to increase the value of ‘memory_limit’ in your php.ini file. Please check your Web server Error Log file for more details.

ERROR CoreConsole[2015-05-14 13:04:45] [d1a74] Empty or invalid response ‘’ for website id 5, Time elapsed: 22.448s, skipping

ERROR CoreConsole[2015-05-14 13:04:48] [d1a74] Got invalid response from API request: http://***/piwik/index.php?module=API&method=API.get&idSite=6&period=day&date=last52&format=php&token_auth=20c77ed16e29173258c0e22802376a3f&trigger=archivephp. The response was empty. This usually means a server error. This solution to this error is generally to increase the value of ‘memory_limit’ in your php.ini file. Please check your Web server Error Log file for more details.

ERROR CoreConsole[2015-05-14 13:04:48] [d1a74] Empty or invalid response ‘’ for website id 6, Time elapsed: 2.855s, skipping
ERROR CoreConsole[2015-05-14 13:04:51] [d1a74] Got invalid response from API request: http://***/piwik/index.php?module=API&method=API.get&idSite=9&period=day&date=last52&format=php&token_auth=20c77ed16e29173258c0e22802376a3f&trigger=archivephp. The response was empty. This usually means a server error. This solution to this error is generally to increase the value of ‘memory_limit’ in your php.ini file. Please check your Web server Error Log file for more details.

ERROR CoreConsole[2015-05-14 13:04:51] [d1a74] Empty or invalid response ‘’ for website id 9, Time elapsed: 3.134s, skipping
INFO CoreConsole[2015-05-14 13:04:51] [d1a74] Done archiving!
INFO CoreConsole[2015-05-14 13:04:51] [d1a74] ---------------------------
INFO CoreConsole[2015-05-14 13:04:51] [d1a74] SUMMARY
INFO CoreConsole[2015-05-14 13:04:51] [d1a74] Total visits for today across archived websites: 0
INFO CoreConsole[2015-05-14 13:04:51] [d1a74] Archived today’s reports for 0 websites
INFO CoreConsole[2015-05-14 13:04:51] [d1a74] Archived week/month/year for 0 websites
INFO CoreConsole[2015-05-14 13:04:51] [d1a74] Skipped 8 websites: no new visit since the last script execution
INFO CoreConsole[2015-05-14 13:04:51] [d1a74] Skipped 1 websites day archiving: existing daily reports are less than 3600 seconds old
INFO CoreConsole[2015-05-14 13:04:51] [d1a74] Skipped 0 websites week/month/year archiving: existing periods reports are less than 3600 seconds old
INFO CoreConsole[2015-05-14 13:04:51] [d1a74] Total API requests: 0
INFO CoreConsole[2015-05-14 13:04:51] [d1a74] done: 0/4 0%, 0 vtoday, 0 wtoday, 0 wperiods, 0 req, 31009 ms, 6 errors.
INFO CoreConsole[2015-05-14 13:04:51] [d1a74] Time elapsed: 31.009s
INFO CoreConsole[2015-05-14 13:04:51] [d1a74] ---------------------------
INFO CoreConsole[2015-05-14 13:04:51] [d1a74] SCHEDULED TASKS
INFO CoreConsole[2015-05-14 13:04:51] [d1a74] Starting Scheduled tasks…
INFO CoreConsole[2015-05-14 13:04:54] [d1a74] task,output
Piwik\Plugins\ExamplePlugin\Tasks.myTask,Time elapsed: 0.000s
INFO CoreConsole[2015-05-14 13:04:54] [d1a74] done
INFO CoreConsole[2015-05-14 13:04:54] [d1a74] ---------------------------
INFO CoreConsole[2015-05-14 13:04:54] [d1a74] ---------------------------
INFO CoreConsole[2015-05-14 13:04:54] [d1a74] SUMMARY OF ERRORS
INFO CoreConsole[2015-05-14 13:04:54] [d1a74] Error: Got invalid response from API request: http://***/piwik/index.php?module=API&method=API.get&idSite=5&period=day&date=last52&format=php&token_auth=20c77ed16e29173258c0e22802376a3f&trigger=archivephp. The response was empty. This usually means a server error. This solution to this error is generally to increase the value of ‘memory_limit’ in your php.ini file. Please check your Web server Error Log file for more details.

INFO CoreConsole[2015-05-14 13:04:54] [d1a74] Error: Empty or invalid response ‘’ for website id 5, Time elapsed: 22.448s, skipping
INFO CoreConsole[2015-05-14 13:04:54] [d1a74] Error: Got invalid response from API request: http://***/piwik/index.php?module=API&method=API.get&idSite=6&period=day&date=last52&format=php&token_auth=20c77ed16e29173258c0e22802376a3f&trigger=archivephp. The response was empty.

This usually means a server error. This solution to this error is generally to increase the value of ‘memory_limit’ in your php.ini file. Please check your Web server Error Log file for more details.
INFO CoreConsole[2015-05-14 13:04:54] [d1a74] Error: Empty or invalid response ‘’ for website id 6, Time elapsed: 2.855s, skipping
INFO CoreConsole[2015-05-14 13:04:54] [d1a74] Error: Got invalid response from API request: http://***/piwik/index.php?module=API&method=API.get&idSite=9&period=day&date=last52&format=php&token_auth=20c77ed16e29173258c0e22802376a3f&trigger=archivephp. The response was empty. This usually means a server error. This solution to this error is generally to increase the value of ‘memory_limit’ in your php.ini file. Please check your Web server Error Log file for more details.

INFO CoreConsole[2015-05-14 13:04:54] [d1a74] Error: Empty or invalid response ‘’ for website id 9, Time elapsed: 3.134s, skipping
ERROR CoreConsole[2015-05-14 13:04:54] [d1a74] 6 total errors during this script execution, please investigate and try and fix these errors.


After looking up for the error we have increased the PHP Memory Limit to 3072M, but still the error do not go away.

Please help to resolve this issue: we are using PHP version 5.6, PIWIK 2.9.1
Thanks,
Subhajit

Hi there,

do you get any error in your server error log file? then check FAQ: FAQ Archive - Analytics Platform - Matomo