The pool of PHP-FPM
Method 1: In a large configuration file unified implementation
Editing a configuration file
Reload Configuration
Method 2: The total number of methods, first in the large configuration file to set a large directory, and then add 2 pool in this directory
1. Editing a large configuration file
2. Configure 2 small configuration files in this directory
Reload configuration, verify pool
PHP-FPM Slow Execution Log
Configuration file
Reload
Vim/data/wwwroot/test.com/sleep.php//writes the following:
Test access effect, 2 seconds before results appear
View Log Results
PHP-FPM definition Open_basedir
Editing a configuration file
Test access results are normal.
Return to the configuration configuration above and deliberately configure the error path
Test again, Access failed
Note Modify the error logging level in the php.ini configuration file
Increase error logging Location
Reload the PHP-FPM configuration file
and add the error log file directory and file, and modify the permissions to 777
Test again
After the test is complete, fix the intentionally wrong configuration file at the beginning
PHP-FPM Process Management
PM = dynamic/Active process management, or static, when it is static, only the maximum number of child processes is active and none else will take effect
Pm.max_children = 50//maximum number of sub-processes, PS aux can be viewed
Pm.start_servers = 20//Number of processes that will start when the service is started
Pm.min_spare_servers = 5//Defines the minimum number of child processes in the idle period, and if this value is reached, the PHP-FPM service automatically derives the new child process.
Pm.max_spare_servers = 35//Defines the maximum number of child processes in the idle period, or, if higher than this value, to start cleaning up idle child processes.
Pm.max_requests = 500//defines the maximum number of requests processed by a child process, that is, a PHP-FPM child process can handle so many requests, and when this value is reached, it exits automatically.
The above values can be defined by themselves
PHP-FPM pool,php-fpm Slow execution log, OPEN_BASEDIR,PHP-FPM process management