PHP-FPM takes up too much CPU, 100% solution _linux

Source: Internet
Author: User

The recent configuration of the LNMP is still stable, secretly pleased, but from the beginning of last night, it was found that the CPU occupied by the server is too high, even to 100%. My memory is 1G, the normal occupancy rate should be below 5%, at most not exceeding 10%.

Aliyun Recent monitoring shows:

Use the top command to see that the php-fpm occupies too much memory and is not normal:

In accordance with the article "two process management methods and optimizations used by the Nginx php-fpm", I configure the following number of PHP-FPM processes:

After restarting the PHP-FPM, still did not solve the problem thoroughly, still can appear occupy more than 99, do not know which friend knows how to analyze and solve? Little brother for help!

Follow-up progress

Yesterday (March 29) to look for @ Rong elder brother Guidance check, and later found that eaccelerator components for some reason to occupy the CPU too high, open php.ini

Vi/usr/local/php/etc/php.ini

Remove Eaccelerator configuration information and restart LNMP

/ROOT/LNMP restart

But still did not completely solve the problem, a few hours later, I restarted the LNMP, incredibly found, seems to have been more and more stable.

Possible commands to use:

Top//view CPU, memory usage information, see which process is consuming CPU height and its PID

Ll/proc/pid number/fd///through the PID to find which file operation process, and then know the problem lies

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.