Closed ghost closed 1 year ago
Hi @LauraTaylorUK, thanks for reporting this.
It's difficult to say what could be causing these random segfaults. It sounds like it could a bug in PHP-FPM which is being triggered by something Matomo is doing.
If you have the PHP-FPM worker output captured then it could be useful to see if there are any PHP warning or errors being logged at the same time as the segfaults are occurring.
If you are using opcache then, if possible, it might be worth temporarily disabling it to see if that makes any difference.
If it is an option, then upgrading to PHP 8.x may also resolve the issue as PHP 7.4 just went end of life.
You mentioned opcache, so I went and deleted the tmp
storage that holds opcache, restarted php-fpm and the problem is gone.
I'm guessing that the updating of matomo over the past few versions 4.13.0 -> 4.13.1 -> 4.13.2 -> 4.13.3 somehow caused the opcache to go stale.
Thank you for your help.
This issue has been mentioned on Matomo forums. There might be relevant details there:
https://forum.matomo.org/t/marketplace-an-error-occurred/15818/4
Expected Behavior
No segfault
Current Behavior
At random intervals, matomo stops working. I can login, but I can't see any results in the dashboard, all attempts to process requests via the matomo-php-tracker all result in php-fpm segfaults, as seen below:
When this happens, matomo displays the following error:
Possible Solution
No idea. Since this is a production server, I can't run debug stuff.
Temporarily, I can run
systemctl restart php-fpm
and matomo goes back to working fine, but eventually it will reach a point when it starts segfaulting again.Steps to Reproduce (for Bugs)
Unfortunately, I can't reliably reproduce the issue, it just happens randomly (I think).
Context
I just login and see real time visits. Tracking is done via the matomo-php-tracker (not the javascript code). I am using AlmaLinux, Apache 2.4.37 and PHP 7.4.30, all official packages as supported by RHEL. The server also runs other PHP projects, only Matomo is affected, no other php-fpm process has issues.
Thank you.
Your Environment