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
Using PHP 8 making Matomo 4 very slow #16707
Comments
Hi, Can you make sure that the PHP 8 php.ini is the same (or similar) as the ones for PHP 7.4? In my tests (to be fair not in production), loading pages with PHP 8 was as instant as before. |
Yes. It's the same. One thing I had to change was the value of the max_execution_time. 30 seconds were to short as I got fatal erros in the nginx log. But the rest is almost identical, no other messages shown. |
Hi @timscha Is JIT active maybe? Would try disabling it maybe (I think that's the ini setting |
@tsteur: I disabled it without any success (restarted fpm of course) and confirmed that JIT under Zend OPcache is disabled. |
That's amazing. I just installed php8.0-fpm (from https://deb.sury.org/) on my server and did nothing apart from changing the nginx config to point at php8.0-fpm.sock. And indeed I can reproduce exaclty this: I'll look into this further. Update: System Check only shows green ticks (once it finally loads) |
@Findus23: Exact the same setup and behavior on my server. Also using the php binaries from sury. |
Hm, the tests I did before (where everything worked fine) I did with a self-compiled PHP-fpm binary. So I wouldn't be surprised if the very extensive php.ini that ships with all debian packages is at fault here. |
I'm not too much into that, but 7.4 are shipped with a also extensive ini. Maybe it's one of the new options introduced with 8.0? |
Remarks:
|
Okay, it seems like only the JS/CSS requests are slow, if you disable merging of the assets (https://matomo.org/faq/troubleshooting/faq_135/) Matomo is usable. The main part might be JShrink running for a very long time. |
That was the reason why I had to extend the max execution time, as I found this in my logs:
|
It seems like this is indeed a bug in JShrink as it even takes ages when using the most simple PHP script. I reported it in tedious/JShrink#96 It also turns out that this also doesn't work with my self-compiled PHP, but I never noticed it as I had |
btw in worst case we could ship Matomo 4 and disable merged assets automatically until we have a workaround. |
Hello!
I tried Matomo 4 RC2 and 3 with RC3 of PHP8.
While pages like settings are ok, the dashboard was very slow and stopped loading. I saw the menubar of Matomo, but nothing more loaded. After I switched back to PHP 7.4 everything worked as expected.
Key facts: nginx, MariaDB 10.5, PHP running as FPM with it's own pool.
Please let me know which logs do you need and I am happy to deliver them to you.
The text was updated successfully, but these errors were encountered: