php5.3 Self-belt PHP-FPM
/usr/local/php/etc/php-fpm.conf
PID = Run/php-fpm.pid
PID settings, default in the installation directory of the Var/run/php-fpm.pid, recommended to open
Error_log = Log/php-fpm.log
Error log, default Var/log/php-fpm.log in the installation directory
Log_level = Notice
The error level. Available levels are: alert (must be processed immediately), error (Errors), warning (warning condition), notice (general important information), debug (debug information). Default: Notice.
Emergency_restart_threshold = 60
Emergency_restart_interval = 60s
Represents the number of php-cgi processes that have SIGSEGV or sigbus errors within the set value of Emergency_restart_interval if more than Emergency_restart_threshold, PHP-FPM will gracefully restart. These two options generally keep the default values.
Process_control_timeout = 0
Sets the timeout for the child process to accept the main process multiplexing signal. Available units: s (seconds), M (minutes), H (Hours), or D (day) default units: S (sec). Default value: 0.
Daemonize = yes
Background execution FPM, the default value is Yes, if you can change to no for debugging.
In FPM, you can use different settings to run multiple process pools. These settings can be set individually for each process pool.
Listen = 127.0.0.1:9000
FPM listening port, that is, nginx in the PHP processing address, the general default value can be.
Available formats are: ' Ip:port ', ' Port ', '/path/to/unix/socket '. Each process pool needs to be set.
Listen.backlog =-1
The number of backlog,-1 for unrestricted, is determined by the operating system, and this line is commented out. Backlog meaning reference:
Http://www.3gyou.cc/?p=41
Listen.allowed_clients = 127.0.0.1
Allow access to FASTCGI process IP, set any to not restrict IP, if you want to set other host Nginx can also access the FPM process, listen to set the cost of access to IP. The default value is any.
Each address is separated by commas. Allow any server to request a connection if it is not set or is empty
Listen.owner = www
Listen.group = www
Listen.mode = 0666
UNIX socket setup options, if you are accessing using TCP, Comment here.
user = www
Group = www
Start the account and group for the process
PM = dynamic
How to control child processes with the option static and dynamic.
If you select static, Pm.max_children specifies the number of fixed child processes.
If dynamic is selected, it is determined by the next open parameter:
Pm.max_children, maximum number of child processes
Pm.start_servers, number of processes at startup
Pm.min_spare_servers, guarantees the minimum number of idle processes, and creates a new subprocess if the idle process is less than this value
Pm.max_spare_servers, guarantees the maximum number of idle processes, and cleans if the idle process is greater than this value
For dedicated servers, PM can be set to static.
pm.max_requests = 1000
Sets the number of requests for services before each subprocess is reborn. is useful for Third-party modules that may have memory leaks. If set to ' 0′, the request is always accepted. Equivalent to php_fcgi_max_requests environment variables. Default value: 0.
Pm.status_path =/status
The URL of the FPM status page. If it is not set, the status page cannot be accessed. Default value: None.
Ping.path =/ping
FPM the ping site of the monitor page. If it is not set, the ping page cannot be accessed. This page is used to externally detect if FPM is alive and can respond to requests. Please note that you must start with a slash (/).
Ping.response = Pong
Used to define the return corresponding to the ping request. Returns the Text/plain-formatted text for HTTP 200. Default value: Pong.
Request_terminate_timeout = 0
Sets the time-out period for a single request. This option may be useful for the ' max_execution_time ' in the php.ini setting that does not abort the script for some special reason. Set to ' 0′ ' indicates ' off '.
You can try to change this option when a 502 error occurs frequently.
Request_slowlog_timeout = 10s
When a timeout is requested for this setting, the corresponding PHP call stack information is fully written to the slow log. Set to ' 0′ ' indicates ' off '
Slowlog = log/$pool. Log.slow
Slow request log, with Request_slowlog_timeout
Rlimit_files = 1024
Sets the Rlimit limit for file open descriptors. Default value: System-defined values
The system defaults to open handle is 1024, can use Ulimit-n view, ulimit-n 2048 modify.
Rlimit_core = 0
Set the core Rlimit maximum limit value. Available values: ' Unlimited ', 0, or positive integer. Default value: System-defined value.
Chroot =
The Chroot directory at startup. The defined directory needs to be an absolute path. If it is not set, then chroot is not used.
ChDir =
Sets the startup directory, which is automatically chdir to the directory when it is started. The defined directory needs to be an absolute path. Default value: Current directory, or/directory (chroot)
Catch_workers_output = yes
StdOut and stderr during the redirection run to the primary error log file. If there are no settings, stdout and stderr will be redirected to/dev/null according to the FASTCGI rules. Default value: null.