Home > Backend Development > PHP Tutorial > [Record] PHP-fpm accounts for 100% of CPU fixed

[Record] PHP-fpm accounts for 100% of CPU fixed

藏色散人
Release: 2023-04-09 14:12:01
forward
3129 people have browsed it

[Record] PHP-fpm accounts for 100% of CPU fixed

Recommended: "PHP Video Tutorial"

Record once php-fpm accounts for 100% of the cpu and fix it

Problem description:

According to feedback from business personnel, the front-end page returned a 502 error. After querying the server, it was found that there are two php-fpm accounting for 100% of the CPU. Restarting php-fpm has no effect.

Solution:

1. Use top to find the process ID that accounts for 100% of the cpu, and use ll /proc/PID/fd to check which file the process is operating on. Only found in the operation log file, but no data is written to the log file.

2. Then use strace -p pid to check the process ID of the full CPU and find that write (xxx) error is always reported.

3. Then use df -h to find that a disk is full and the log cannot be written, causing php-fpm to occupy 100% of the CPU.

The above is the detailed content of [Record] PHP-fpm accounts for 100% of CPU fixed. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:learnku.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template