PHP-FPM optimization

Source: Internet
Author: User
Tags fpm

One php.ini optimization
#关闭危险函数disable_functions=system,passthru,exec,shell_exec,popen,phpinfo# Close php name and version expose_php=off# error Message control, test time to open display_errors=off-level constant error value error report description E_error1Fatal Run-time error (blocking script execution) e_warning2Run-time warning (non-fatal error) E_parse4parsing error e_notice from syntax8Runtime Note message (may or may not be a problem) E_core_error -fatal error during initialization of PHP startup E_core_warning +warnings during initialization of PHP startup (non-fatal error) E_compile_error -compile-time fatal error e_compile_warning -Compile-time warning (non-fatal error) E_user_error theuser-defined fatal error e_user_warning +user-defined warning (non-fatal error) E_user_notice1024x768User-definable reminders (often bugs) e_strict2048Coding Normalization Warning (recommended how to modify to forward compatible) E_all6143all error, warning, and attention information error_reporting= E_all & ~e_deprecated Open error log log_errors=Onerror_log=/var/log/php-fpm/php-Errors.loglog_errors_max_len=1024x768#日志长度 # Whether to ignore duplicate error messages that occur on the same file and on the same line ignore_repeated_errors=off# ignores duplicate errors that occur in different files and not peers in the same file. Ignore_repeated_source=Offignore_repeated_source=off# This parameter to determine whether a memory leak is displayed or logged when PHP is compiled in debug mode. In addition to the debug mode constraint, at least one e_warning in an error level must take effect. Report_memleaks=on# Turn off remote open Allow_url_fopen=on# This option activates the URL form of the fopen encapsulation protocol so that URL objects such as files can be accessed. The default encapsulation protocol is provided withFTPand HTTP protocol to access remote files, some extension libraries such as zlib may register more encapsulation protocols. Allow_url_include=on# max upload file upload_max_filesize 20M Multi-file long pass limit max_file_uploads= -#socket流的超时时间default_socket_timeout=Ten#每个脚本等待输入的最长时间 (script parsing) Max_input_time= -#放置Nginx文件类型错误解析漏洞cgi. Fix_pathinfo=0#单个脚本最长运行时间max_execution_time= -#接收数据的时间限制max_input_time= -#单个脚本最大运行时间memory_limit=128M Adjust php sesson information storage type and location Session.save_handler=Memcachesession.save_path="tcp://192.168.94.37:11211"
Two php-fpm.conf
==32768= epoll# introduces the main configuration file include=/usr/local/php-7.2. 9/ETC/PHP-FPM.D/*. conf
Three www.conf
 user = Nginxgroup  = nginx# listener Address Listen  = 127.0 . 0.1 : 9000   Number of child processes Pm.max_children  = 1024   start to make the process Pm.start_ Servers  = 16   min Idle pm.min_spare_servers  = 5   max idle pm.max_spare_servers  = Span style= "COLOR: #800080" >20   process timed out pm.process_idle_timeout  = 15s; The maximum number of child processes pm.max_requests  = 2048   slow query Slowlog  =/var/log/php-fpm/ $pool. Log.slowrequest_slowlog_ Timeout  = 10  

PHP-FPM optimization

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.