php-fpm Several restart methods of

mode 1: signal control

php 5.3.3 Later php-fpm  No longer supported  php-fpm Previous /usr/local/php/sbin/php-fpm
(start|stop|reload) Wait for the order , So don't look at this old order , Signal control is required :

master The process can understand the following signals

INT, TERM  Immediate termination
QUIT  Smooth termination
USR1  Reopen the log file
USR2  Smooth overload all worker Process and reload the configuration and binary modules  
ps aux|grep php-fpm
find master Main process ( Find a pair Ss), Find the process corresponding to the main process ID( This is me 2542)
kill -USR2 2542

 

Mode 2 : php-fpm.pid control

View profile  cat /usr/local/php/etc/php-fpm.conf find ,pid Configured to open , In this way
[global] ; Pid file ; Note: the default prefix is /usr/local/php/var ; Default
Value: none pid = run/php-fpm.pid
php-fpm close :
kill -INT 'cat /usr/local/php/var/run/php-fpm.pid'
php-fpm restart :
kill -USR2 'cat /usr/local/php/var/run/php-fpm.pid'
 

Technology