Quantcast
Channel: Support & Bugs - Matomo forums
Viewing all articles
Browse latest Browse all 5706

Cron Job: Got invalid response from API request

$
0
0

@cloureiro wrote:

Hello,

I have a problem, that I already have found that some people had the same problem. However the solutions that solved didn’t work to me.
I have Matomo (piwik) working for 2 years. A few months ago (3 or 4) I had a second web site to it. About a 1,5 months ago I start to have the following an error on the Cron Job.

The problem is the cron job that is executed every hour. I start to get the following error:

ERROR [2018-05-02 14:13:02] Got invalid response from API request: ?module=API&method=API.get&idSite=1&period=day&date=last52&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 in your PHP CLI error log file. As this core:archive command triggers PHP processes over the CLI, you can find where PHP CLI logs are stored by running this command: php -i | grep error_log
ERROR [2018-05-02 14:13:02] Empty or invalid response ‘’ for website id 1, Time elapsed: 0.530s, skipping
ERROR [2018-05-02 14:13:03] Got invalid response from API request: ?module=API&method=API.get&idSite=2&period=day&date=last52&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 in your PHP CLI error log file. As this core:archive command triggers PHP processes over the CLI, you can find where PHP CLI logs are stored by running this command: php -i | grep error_log
ERROR [2018-05-02 14:13:03] Empty or invalid response ‘’ for website id 2, Time elapsed: 0.664s, skipping
ERROR [2018-05-02 14:13:03] 4 total errors during this script execution, please investigate and try and fix these errors.

I don’t have direct access to the server, all the access is made by Cpanel.
the cron execution is:
/opt/alt/php56/usr/bin/php /home/MYFOLDER/public_html/WEBSITEFOLDER/piwik/console core:archive --url=http://MYDOMAIN/piwik/ > /dev/null

Server information:
Apache Version 2.4.25
PHP Version 5.6.30
MySQL Version 10.1.32-MariaDB
Matomo 3.4.0

I have heck the memory size, and was increased to 512Mb
I have add to the command line --accept-invalid-ssl-certificate
The 2 web site together have less that 70 visits a day.

Meanwhile I have found that on Matomo Settings:
System -> General Settings
under the option “Archiving settings”, was Yes by default and "Archive reports at most every 150 seconds"
I just disable it, and make some visits to the both web sites and force to execute the cron job, and still have the same error.

Any idea? I thanks any help that can give me.

Posts: 2

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 5706

Trending Articles