The pool of PHP-FPM

Source: Internet
Author: User
Tags fpm


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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.