How to kill stuck php-fpm processes

General Tech Bugs & Fixes 2 years ago

0 2 0 0 0 tuteeHUB earn credit +10 pts

5 Star Rating 1 Rating

Posted on 16 Aug 2022, this text provides information on Bugs & Fixes related to General Tech. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.

Take Quiz To Earn Credits!

Turn Your Knowledge into Earnings.

tuteehub_quiz

Answers (2)

Post Answer
profilepic.png
manpreet Tuteehub forum best answer Best Answer 2 years ago

 

I have a production server, where I am not able to kill php-fpm processes.

I am not able to kill any of the following process with kill -9.

service php-fpm start,keeps on running, but doesnt give any error or output.

System Reboot is not an option :(

[root@vtermination etc]# ps aux | grep "php"
root      1142  0.0  0.2 753984 35532 ?        D    19:04   0:00 php-fpm-5.5
root      3133  0.0  0.2 753840 35220 ?        D    19:43   0:00 php-fpm has invoked oom-killer
root      3591  0.0  0.2 753984 35536 ?        D    19:11   0:00 php-fpm-5.5
nginx     5470  0.0  0.2 761196 32960 ?        D    17:01   0:00 php-fpm: pool www
nginx     5548  0.0  0.2 835268 38768 ?        D    17:01   0:00 php-fpm: pool www
root      6917  0.0  0.2 753984 35636 ?        D    19:05   0:00 php-fpm-5.5
nginx     7266  0.0  0.2 761848 36652 ?        D    17:02   0:00 php-fpm: pool www
root      7308  0.0  0.2 753984 35536 ?        D    19:12   0:00 php-fpm-5.5
root      9638  0.0  0.2 641444 31820 ?        S    19:22   0:00 /usr/bin/php -q /home/vtermina/private/crons/text/text_failed_sockets.php
root     10103  0.0  0.2 753984 35428 pts/4    D    19:12   0:00 php-fpm-5.5
nginx    10951  0.0  0.2 761472 33520 ?        D    17:36   0:00 php-fpm: pool www
nginx    10955  0.0  0.2 761192 34024 ?        D    17:36   0:00 php-fpm: pool www
nginx    10958  0.0  0.2 761580 34196 ?        D    17:36   0:00 php-fpm: pool www
nginx    10961  0.0  0.2 761392 35504 ?        D    17:36   0:00 php-fpm: pool www
root     11123  0.0  0.2 753984 35512 ?        D    19:13   0:00 php-fpm-5.5
root     12141  0.0  0.2 753984 35372 ?        D    19:06   0:00 php-fpm-5.5
root     17819  0.0  0.2 753984 35576 ?        D    19:22   0:00 php-fpm-5.5
root     18166  0.0  0.2 753984 35588 ?        D    19:23   0:00 php-fpm-5.5
root     19724  0.0  0.2 753984 35576 ?        D    19:07   0:00 php-fpm-5.5
root     20242  0.0  0.0 110388  1808 pts/4    S+   19:49   0:00 grep php
root     22224  0.0  0.2 753984 35508 ?        D    19:08   0:00 php-fpm-5.5
root     23341  0.0  0.2 753984 35616 pts/5    D    19:08   0:00 php-fpm-5.5
root     24044  0.0  0.2 753984 35448 ?        D    19:09   0:00 php-fpm-5.5
root     24715  0.0  0.2 753956 35164 pts/5    D+   19:15   0:00 php-fpm -t
root     25229  0.0  0.2 753984 35660 pts/6    D    19:09   0:00 php-fpm-5.5
root     25439  0.0  0.2 753984 35540 ?        D    19:10   0:00 php-fpm-5.5
root     25721  0.0  0.2 753984 35564 pts/3    D    19:00   0:00 php-fpm-5.5
root     26046  0.0  0.2 753984 35560 ?        D    19:01   0:00 php-fpm-5.5
root     28064  0.0  0.2 753984 35276 pts/4    D    19:01   0:00 php-fpm-5.5
root     28358  0.0  0.2 753984 35488 ?        D    19:02   0:00 php-fpm-5.5
root     29052  0.0  0.2 753984 35604 ?        D    19:03   0:00 php-fpm-5.5
nginx    29728  0.0  0.2 761148 31980 ?        D    17:41   0:00 php-fpm: pool www
nginx    29731  0.0  0.2 761868 35700 ?        D    17:41   0:00 php-fpm: pool www
nginx    31384  0.0  0.2 761788 39076 ?        D    17:00   0:00 php-fpm: pool www
profilepic.png
manpreet 2 years ago

try this:

sudo kill -9 `sudo ps -ef | grep php-fpm | grep -v grep | awk '{print $2}'`

0 views   0 shares

No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.