PHP-FPM,
What is PHP-FPM?
PHP-FPM is a PHP-specific process manager that implements FastCGI protocol for managing PHP-CGI.
Install
The PHP-FPM is integrated into PHP after PHP5.3.3 and does not need to be installed separately.
Use
Start
➜ ~ sudo php-fpm[15-Feb-2015 15:52:10] NOTICE: fpm is running, pid 6995[15-Feb-2015 15:52:10] NOTICE: ready to handle connections
The second line above is the process number pid 6995 after php-fpm is started.
After starting in this way, php-fpm will occupy the terminal for running.
Restart
Commit logs git :( master) sudo kill-SIGUSR2 6995 // 6995 is the php-fpm process number [15-Feb-2015 15:54:51] NOTICE: Reloading in progress... [15-Feb-2015 15:54:51] NOTICE: reloading: execvp ("php-fpm", {"php-fpm"}) [15-Feb-2015 15:54:51] NOTICE: using inherited socket fd = 6, "127.0.0.1: 9000 "[15-Feb-2015 15:54:51] NOTICE: fpm is running, pid 6995 [15-Feb-2015 15:54:51] NOTICE: ready to handle connections
Smooth Shutdown
➜ logs git:(master) sudo kill -SIGQUIT 7688[15-Feb-2015 16:19:01] NOTICE: Finishing ...[15-Feb-2015 16:19:01] NOTICE: exiting, bye-bye!
Force close
Login logs git :( master) sudo kill-SIGINT | SIGTERM 6995 // SIGINT, SIGTERM two signals can be [15-Feb-2015 16:10:43] NOTICE: Terminating... [15-Feb-2015 16:10:43] NOTICE: exiting, bye-bye!
Re-open the log file. It is not clear what this means...
Unzip logs git :( master) sudo kill-SIGUSR1 6995 // 6995 is the php-fpm process number [15-Feb-2015 16:02:00] NOTICE: error log file re-opened