PHP-fpm/cgi and APC or xcache encounter deadlocks. A machine keeps running PHP5.3.x (fpm or fastcgi mode), and deadlock often occurs from time to time. The performance is that the FCGI service cannot be connected. NGINX reports 502 badgateway. in this case, php in the system...
PHP-fpm/cgi and APC or xcache encounter deadlocks.
A machine keeps running PHP 5.3.x (fpm or fastcgi mode), and deadlock often occurs from time to time.
The performance is that the FCGI service cannot be connected. NGINX reports 502 bad gateway. at this time, the php processes in the system are still running, but they are all stuck in the futex () system call, it is obvious that a deadlock has occurred.
I checked some information and found that this BUG was submitted two years ago. so far, it seems that there is no proper solution because if the script times out when the resource is locked, in this case, PHP closes the request through longjmp jump, causing the lock to be released incorrectly.
Currently, you can add exit_on_timeout = On to php. ini in PHP5.3 to solve this problem. This means that the process will be killed when timeout occurs, so that the system can reclaim such lock resources and avoid deadlocks.
Author: "linux"