Php-fpm 100% CPU on AWS Lightsail

Keywords: WordPress - AWS - Technical issue - Other
bnsupport ID: 725f42cb-f354-733b-943a-38b3f7df7081
Description:
I have a lightsail installation that has been active for a number of months. About a week ago I noticed that my website became unresponsive. When looking into the issue I noticed that the php-fpm process was pegged at 100%. There were no changes to the server other than simple theme/plugin updates. During my diagnosis have attempted to shut down all caching at the server level as I use a CDN as well as W3TC configured and working, this made no difference to the processor usage and they have since been re-enabled. I have doubled my CPU and Memory by increasing my Lightsail instance but this has also not provided any relief.

I have run the Bitnami Diagnostic Tool, my output is:

725f42cb-f354-733b-943a-38b3f7df7081

Please let me know where I need to look next.
Thank you!

Hello @DuaneEDG,

First, I would recommend taking a look at our Wordpress troubleshooting guide:
https://docs.bitnami.com/aws/how-to/troubleshoot-wordpress-issues/#is-your-installation-slow

I can also see this:

[pool www] server reached max_children setting (5), consider raising it

You can increase your php-fpm values, in your /opt/bitnami/php/etc/memory.conf file. Remember that you will need to restart the services later. However, I don’t think it would help very much to decrease the CPU usage.

This guide may help:
https://www.kinamo.be/en/support/faq/determining-the-correct-number-of-child-processes-for-php-fpm-on-nginx

I see some PageSpeed errors in the Apache log ( /opt/bitnami/apache2/logs/error_log )
You can try to disable PageSpeed using the guide below:

https://docs.bitnami.com/aws/apps/wordpress/administration/use-pagespeed/#disable-pagespeed

Find below the guide to block suspicious IPs in case you may detect any suspicious access:
https://docs.bitnami.com/aws/faq/configuration/block-suspicious-ip/

Unfortunately, I’m not sure what can be causing those issues, but I think it can be related to plugins or the theme you are using. Can you try using another theme or disabling any plugin to check it?

Regards

Davidg,

Thank you for your response. I had already tweaked all the setting you recommended based on previous posts in the forums. Unfortunately I was provided no relief.

I did eventually trace the issue to a process in one of my plugin’s that checks email. There was a malformed email in the email box and whenever the plugin attempted to check the email box for new email it would fail while attempting to process the malformed message.

I have added that to my diagnostic checklist for future reference.

Sorry to have posted this issue as it was not an issue cause with the Bitnami package.
Duane.

Thank you @DuaneEDG for sharing the solution with the community!

Regards