Php-fpm CPU usage high since PHP 8.1 and v5.5.6 Upgrade

Hi guys - I have successfully updated my install to v5.5.6 and PHP 8.1 (I’m running Ubuntu 20.04 with nginx)

Since doing this I’m seeing high CPU usage for php-fpm pool web (CPU is pegged at 30% pretty much constantly) Didn’t have this issue prior to the upgrade.

Are there any settings I need to change in my php.ini after upgrading to 8.1 that will prevent this?

Many thanks

not sure on this one, it may help to run

ps aux | grep php



to see if it is the queue processes with the increased load

Hi David - Here is the output of ps aux | grep php

root 970 0.0 0.7 226212 30320 ? Ss Aug04 0:14 php-fpm: master process (/etc/php/8.1/fpm/php-fpm.conf)
www-data 1106 9.6 2.2 307932 90336 ? S Aug04 425:24 php-fpm: pool www
www-data 1107 9.5 1.6 232416 66424 ? S Aug04 424:04 php-fpm: pool www
www-data 1343 9.6 1.9 307288 79632 ? S Aug04 424:37 php-fpm: pool www

This issue is resolved - had nothing to do with Invoice Ninja in the end. Caused by HAProxy check type set to ‘HTTP’ - I noticed continuous ‘GET’ requests from my reverse proxy in the invoice ninja access logs. Setting the check type to ‘Basic’ resolved the issue and CPU usage is now normal.

Not sure quite what the differences are between PHP 7.x and 8.x and how this relates to HAProxy - but will investigate further.

Kind Regards

1 Like