New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle "Got invalid response from API request" better #14515
Comments
i get the same error, how do i fix it? |
In my case, the error is not easy to spot and the only way to find out what is causing it was by guessing, reading other issues in here (e.g. #15123) and checking out the mariadb error log. Matomo itself doesn't give a clue (or the wrong clue entirely):
It also did not write to the php-cli error log. |
@kwisatz Maybe check if your PHP ini settings if possible to see if you can enable more granular logging? It seems Matomo did not get any information from PHP so maybe it could be even a segfault or something. Have you checked the See https://matomo.org/faq/troubleshooting/faq_115/
Not sure but it might also help to launch the archiver using |
it's really valuable to make error reporting clearer and easier 👍 recently we've actually made a few small improvements to how errors are reported in |
While I don't have more debug information to give you, I can at least
tell you that the mysql communications error resulted from an OOM event.
I had to increase the server's memory to 3GB to make it work.
Which is odd, considering that the previous server, from which I
migrated the matomo installation was running (not well, but not crashing
at least) with 1GB of Memory. What changed were the PHP version (7.0 ->
7.2) and the database (Mysql 5.7 -> MariaDb 10.3).
|
We often have users on the forum that have some problem with the cron archiving.
Currently, the achiever tries to parse the response and fails. It then produces this two lines:
If you know where to look, you are easily able to find the reason for the error
curl_exec: Could not resolve host: matomo.matomo. Hostname requested was: matomo.matomo
. But for a user using this the first time, this is hard to spot.Another example for such an error message would be:
Again preceded by
ERROR [2019-03-19 14:58:46] 17845 Got invalid response from API request: ?module=API&method=API.get&idSite=52&period=day&date=last52&format=php&trigger=archivephp. Response was
and on most devices out of sight of the user to the right.It would be better to really print out what the error was, even on a new line.
The text was updated successfully, but these errors were encountered: