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
Gateway Timeout on core:archive task #14359
Comments
This is pretty much not a bug in Matomo, so the forums would be a better place for this. Anyway, please take a look into your PHP error log from Matomo to see if there is anything related to the triggered archiving requests. |
Ok, thanks. Added a new forum topic then: Unfortunately, nothing shows up in the error logfile related to this. |
How do we know that this is not a bug in Matomo? |
Its simple: If this would be a bug with Matomo, much more users would have it. Furthermore, a gateway timeout is a typical problem for a misconfigured PHP instance. |
I am having a similar issue. The warning message is this:
As you can see, the warning message has this unserialize() that appeared after Matomo 3.9.0. Might have nothing to do with this, I just mention it. After the warning message, the error message is this:
The thing is that this problem is not consistent with all the websites and all the periods. Right now I am trying to reprocess all the logs and this error doesn't appear after every debug but occasionally. If the problem is a misconfigured PHP instance, then where should I look for the possible causes/solutions? I have just an installation of Software Collections PHP 7.2 by RedHat and the only values altered in php.ini are the memory_limit and max_execution_time which I have increased. |
The unserialize error will always be shown if the answer from the server is not the expected, so the problem is unrelated. What webserver are you using? Is there a reverse proxy in place? Do you use PHP-fpm (probably)? |
I am using Apache httpd deployed in Openshift. There is a reverse proxy, not configured by me. I don't know if I am using PHP-fpm, I didn't make any changes in PHP besides installing PHP and changing the two variables mentioned. The installed packages are:
|
Ok, that is a setup I cannot directly help you with. But I can say you one thing: Most webservers have a default timeout configured for proxy handling. You can override this setting, for apache see https://httpd.apache.org/docs/2.4/mod/mod_proxy.html#proxytimeout. I prefer a timeout one second shorter than your PHP For nginx with php-fpm this would look like |
I am not using fpm thought. Could it be the reason I am seeing this error? |
Unlikely.
All I said is valid for all proxies, php-fpm is just a very good example. |
Sometimes I am also getting:
In widgets (eg Visits Over Time) if I request reports for a whole year. The websites are not archived because archiving fails in many sites with the discussed error. Maybe these issues are related but I have no idea what might be wrong in the server configuration. What do you think? Also, I should mention that the database without any archived table is around 200GB. |
Hey,
just wanted to setup the archive cron but running into the following error when triggering it manually:
/path/to/matomo/core/Common.php(271): Notice - unserialize(): Error at offset 0 of 246 bytes - Matomo 3.9.1
Error: Error unserializing the following response from ?module=API&method=API.get&idSite=1&period=week&date=last260&format=php&trigger=archivephp: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>504 Gateway Timeout</title> </head><body> <h1>Gateway Timeout</h1> <p>The gateway did not receive a timely response from the upstream server or application.</p> </body></html>
Wondering what might cause this. Couldn't find a solution to this problem yet.
Raising execution times (180 sec) and memory limits (512MB) didn't help either.
ran this command with
PHP 7.2.3 (cli) (built: Mar 5 2018 11:28:44) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies with the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured) v10.2.5, Copyright (c) 2002-2018, by ionCube Ltd.
The text was updated successfully, but these errors were encountered: