How to Troubleshoot High CPU Usage Caused by php-fpm and eAccelerator
I thought the LNMP stack I configured recently was running pretty stable, and I was quietly patting myself on the back鈥攗ntil last night, when I noticed the server’s CPU usage was excessively high, even hitting 100%. My server has 1GB of RAM, and under normal circumstances, usage should stay below 5%, 10% at most. The latest Alibaba Cloud monitoring showed: cmhello.com-201303089 Using the top command to inspect, I found that php-fpm was consuming way too much memory, which is highly abnormal: cmhello.com-201303090 I followed the article “Two Process Management Methods and Optimization for php-fpm Used by Nginx” and configured the number of php-fpm processes as follows: cmhello.com-201303091 After restarting php-fpm, the issue still wasn’t completely resolved; usage would still spike above 99%. I wonder if any friends out there know how to analyze and fix this? Any help would be greatly appreciated! Follow-up Progress Yesterday (March 29th), I asked @瀹瑰摜 for guidance on troubleshooting, and we eventually discovered that the eAccelerator component was the culprit behind the high CPU usage for some unknown reason. I opened php.ini1 vi /usr/local/php/etc/php.ini and removed the eAccelerator configuration