Auto Archive Error - Got invalid response from API request

At a little bit of a dead end on how to troubleshoot this and not sure where to start.

INFO [2017-11-30 21:18:43] SUMMARY OF ERRORS
INFO [2017-11-30 21:18:43] Error: Got invalid response from API request: ?module=API&method=API.get&idSite=1&period=day&date=last30&format=php&trigger=archivephp. The response was empty. This usually means a server error. A solution to this error is generally to increase the value of ‘memory_limit’ in your php.ini file. For more information and the error message please check your web server’s error Log file. As this core:archive command triggers PHP processes over HTTP, you can find the error message in your Piwik’s web server error logs.
INFO [2017-11-30 21:18:43] Error: Empty or invalid response ‘’ for website id 1, Time elapsed: 0.155s, skipping
INFO [2017-11-30 21:18:43] Error: Got invalid response from API request: ?module=API&method=API.get&idSite=2&period=day&date=last18&format=php&trigger=archivephp. The response was empty. This usually means a server error. A solution to this error is generally to increase the value of ‘memory_limit’ in your php.ini file. For more information and the error message please check your web server’s error Log file. As this core:archive command triggers PHP processes over HTTP, you can find the error message in your Piwik’s web server error logs.
INFO [2017-11-30 21:18:43] Error: Empty or invalid response ‘’ for website id 2, Time elapsed: 0.172s, skipping
INFO [2017-11-30 21:18:43] Error: Got invalid response from API request: ?module=API&method=API.get&idSite=3&period=day&date=last17&format=php&trigger=archivephp. The response was empty. This usually means a server error. A solution to this error is generally to increase the value of ‘memory_limit’ in your php.ini file. For more information and the error message please check your web server’s error Log file. As this core:archive command triggers PHP processes over HTTP, you can find the error message in your Piwik’s web server error logs.
INFO [2017-11-30 21:18:43] Error: Empty or invalid response ‘’ for website id 3, Time elapsed: 0.187s, skipping

System Information:
Windows Server 2016 / IIS 10.0
Piwik V 3.2.0
PHP 7.1.11
MySQL 5.7.20

I’ve already increased the memory limit in the php.ini file.

Hi,

Have you checked your php error log for corresponding error messages?

How are you archiving? Do it like this if you are on localhost:

php console core:archive --url=http://YourIPAddress/pathTo/Piwik --accept-invalid-ssl-certificate

I’ve checked my php error log and its empty. I’ll do a little more digging around for other error messages. I noticed that I’m not logging any piwik errors in the piwik config.

I was following the instructions here: How to Set up Auto-Archiving of Your Reports - Analytics Platform - Piwik

I’ll try running that localhost command.

That seems to have fixed that error. We definitely have a valid SSL Certificate installed. I wonder why it isn’t finding it. I’ll have to dig into that.

So full write-up of what removed the error.

Previously I had a scheduled tasked which ran the following:

php.exe "C:\inetpub\wwwroot\piwik\console" core:archive --url=https://mydomain.com/piwik/

Adding the argument to ignore SSL Certificates allowed it to make the connection.

php.exe "C:\inetpub\wwwroot\piwik\console" core:archive --url=https://mydomain.com/piwik/ --accept-invalid-ssl-certificate

Thanks eramirez

1 Like