Alaa
Alaa

Reputation: 4601

php-fpm processes falls in Uninterruptible sleep

I got nagios critical warning about a server, and when i checked ps -aux i found that all of nginx (php-fpm) are in Uninterruptible sleep

www-data  1330  0.4  0.3 299992 108560 ?       D    16:06   0:16 php-fpm: pool www
www-data  1338  0.4  0.2 254728 92728 ?        D    16:06   0:16 php-fpm: pool www
www-data  1346  0.4  0.3 293544 100272 ?       D    16:06   0:17 php-fpm: pool www
www-data  1356  0.7  0.3 302504 101532 ?       D    16:06   0:29 php-fpm: pool www
www-data  1357  0.3  0.2 270672 85952 ?        D    16:06   0:13 php-fpm: pool www
....

and i was stuck with it and couldn't even restart nginx. and finally i restart the server to fix the issue! and today the problem happened again and i managed to restart php5-fpm which reduces the server load from 300 to 1.XX
although I have this in /etc/php5/fpm/php.ini

emergency_restart_threshold=10
emergency_restart_interval=1m
process_control_timeout=10s

which means that php5-fpm is supposed to restart in such cases, but it didn't!!
any idea of what might cause those processes to go in uninterruptible sleep status and how to avoid such case in future?

Upvotes: 1

Views: 3974

Answers (1)

Gnarfoz
Gnarfoz

Reputation: 3236

Uninterruptible Sleep translates to I/O. A process in this state does not handle signals. Thus, PHP-FPM can not restart a process that is in this state.

You probably have a bad hard drive, stale/dead network mount (nfs, cifs?) the PHP scripts are trying to access, or a really bad case of I/O contention.

Also, this is not related to at all.

Upvotes: 2

Related Questions