Define a pool can define multiple pool listening but different sock files if so the site uses the same pool one site 502 Other sites will also be 502
Add a pool again
Detect syntax and restart
View two different pools
Put test.com.conf
defined as Fastcgi_fastcgi_pass Unix defined as sock
Define aaa.com.conf as Aming.sock
Separate the two domain names from the site.
Test.conf request is a lot of php-fpm resources exhausted, and then a request will be reported 502
Another site is unaffected
Add the Www.pool and Aming.pool separately from the main configuration file
Edit Master Profile php-fpm.conf add
Create a Directory
and create a file www.conf
and write it inside
Create aming.conf again
and write the content
Vhosts of type Nginx
Detection syntax
Reload
View with PS
PHP-FPM Slow Execution Log
LNMP Architecture
Can be divided into PHP slow execution log
The company's website is slow to perform log analysis with slow execution
Edit Wwww File
Log logs for more than a second
Detect Reload
To see if a log file is generated
Test Site Usage Catalog
Create File sleep.php
Write script
Validation Error 500
Editing a configuration file
Set Display_errors
You can display the error colon or semicolon syntax error script directly on the browser
Re-editing scripts
Re-Test
View Log Slow.log
Slow script The first few lines of the script are slow
The third line is over two seconds.
Define Open_basedir
PHP.ini if more than one site is redefined or defined in a Apche virtual host profile or in a php-fpm file
Define Open_basedir for different pools
Edit www.conf File
Test
Verify
First display-errors to close.
Specifying the error log directory
Define error level All
Change the WWW.COF site address to the wrong
Create Log modification permissions
Access 404 Error
View Log error messages Open_basedir restricted directories are inconsistent with the directory accessed
Correct re-access OK after modification
PHP-FPM Process Management
Dynamic start dynamically
Only Max_children effective start of the service started 50
The start of a process can also be static
Start_servers number of start-up services
The pool of PHP-FPM