This article mainly describes how to configure PHP-FPM, common error resolution and PHP-FPM startup, shutdown, and restart.
The Nginx in the LNMP environment does not support PHP and requires the FASTCGI plug-in to process requests for PHP. and PHP needs to php-fpm This component to provide this functionality. Prior to php5.3.3 version php-
[TOC]PHP-FPM configuration related one, PHP-FPM configuration
Unlike lamp, in the LNMP architecture, PHP-FPM as a standalone service exists, and since it is a standalone service, it must have its own configuration file. The PHP-FPM configuration file is/usr/local/php-fpm
12.21 PHP-FPM's PoolUnlike lamp, in the LNMP architecture, a PHP-FPM-seat standalone service exists. Since it is a standalone service, it must have its own configuration file.The PHP-FPM configuration file is/usr/local/php-fpm/etc/php-fpm.conf, which also supports the include statement, similar to the include in nginx.conf.Nginx can configure multiple virtual hos
This article by show according to Lin Feng to provide friendship sponsorship, starting in the mud row world. LNMP environment in the building, now only PHP has no source installed. This article will introduce you to this. Note This article uses the CentOS 6.5 64bit. Login to CentOS to download the php5.6 installation package. PHP package can go to the domestic souhu mirror site to download. wget http://mirrors.sohu.com/php/php-5.6.2.tar.gz Before installing, we need to install the packages that
The FPM (FastCGI process Manager) replaces most of the additional features of PHP FastCGI and is useful for high-payload sites.Its features include:
Advanced process management features that support smooth stop/start;
Can work in different uid/gid/chroot environments, and listen to different ports and use different php.ini configuration files (can replace Safe_mode settings);
StdOut and stderr log records;
Ability to restart and c
I've been trying to deploy a PHP micro-service that uses Docker containers recently. One of the problems is that our PHP application is set up to work with PHP-FPM and nginx (not the simple apache/php[1] setting here), so each PHP microservices requires two containers (that is, two Docker images):
PHP-FPM container
Nginx Container
Assuming that an application runs more than six PHP microse
First, the pool of PHP-FPM
The PHP-FPM configuration file php-fpm.conf can be set to multiple pool, where one pool resource is exhausted, causing other sites to be unable to access resources, reporting a 502 error. It is necessary to separate the sites, using separate pool respectively.
1. Modify the configuration filepear.conf php-fpm.conf php-fpm.conf.default php.ini[[emailprotected] etc]
To agree on several directories
/usr/local/php/sbin/php-fpm
/usr/local/php/etc/php-fpm.conf
/usr/local/php/etc/php.ini
First, the PHP-FPM start parameter
#测试php-FPM Configuration
/usr/local/php/sbin/php-fpm-t
/usr/local/php/sbin/php-fpm-c/usr/local/php/etc/php.ini-y/u
PHP-FPM start parameters and important configuration of the detailed, this needless to say, do PHP development students need to use.Contract several directories/usr/local/php/sbin/php-fpm/usr/local/php/etc/php-fpm.conf/usr/local/php/etc/php.iniOne, the php-fpm start parameter#测试php-FPM Configuration/usr/local/php/sbin/
To agree on several directories
/usr/local/php/sbin/php-fpm/usr/local/php/etc/php-fpm.conf/usr/local/php/etc/php.iniFirst, the PHP-FPM start parameter
Copy Code code as follows:
#测试php-FPM Configuration
/usr/local/php/sbin/php-fpm-t
/usr/local/php/sbin/php-fpm
The pool of PHP-FPMPHP-FPM configuration file php-fpm.conf can set multiple pool, in which one pool resource is exhausted, will cause other sites to not access resources, reported 502 error. It is necessary to separate the sites, using separate pool respectively.1. Modify the configuration filepear.conf php-fpm.conf php-fpm.conf.default php.ini[[emailprotected] etc]# vim php-fpm.confinclude = etc/php-fpm.d/*.conf[global]#定义全局参数pid = /usr/local/php-
I checked the relationship between fastcgi and php-fpm on the Internet for nearly a week. I basically read it all over again. There are different opinions and there is no authoritative definition. Some on the Internet say that fastcgi is a protocol, and php-fpm implements this Protocol; some say that php-fpm is the manager of the fastcgi process, which is used to
Label:In this article, we will specifically explain the configuration of Nginx, PHP-FPM, and MySQL running under individual users.First of all to do a description: Nginx itself can not handle PHP, it is just a Web server. When a client request is received, if it is a PHP request, it is forwarded to the PHP interpreter for processing and returns the result to the client. If it is a static page, Nginx handles it itself and returns the result to the clie
Background
Their server is a cloud server, the recent frequent php-fpm suspended animation state, hard disk and memory are relatively small, so the memory is often not enough, through the Linux command to view, found that the number of boot PHP-FPM process has more than 20, occupy nearly 1G of memory, The entire server is only 1.5G of memory, and finally through the PHP-
Server normal operation 2 months, the day before yesterday the whole station suddenly appeared 502 bad Gateway, all pages are not open, using the NGINX+PHP-FPM mode.Server situation: This server traffic is relatively large, PV around 300,000 per day, database use of MYSQL5, the largest table data has 800,000, the total database capacity of about 10G.The failure occurred immediately after the thought may be php-fpm
The 1 FPM (FastCGI process Manager) replaces most of the additional features of PHP FastCGI and is useful for high-payload sites.Its features include:Support Smooth stop/ start advanced process management function, can work on different uid/gid/" slow log " -- Special features: Used to continue to perform time-consuming work in the background (input video conversion, statistical processing, etc.) after the request completes and refreshes the data; dy
(persistent connection) can work.fastcgi of the poorBecause it is multi-process, so consumes more server memory than CGI multithreading, php-cgi interpreter consumes 7 to 25 megabytes per process, multiplying this number by 50 or 100 is a large amount of memory.Nginx 0.8.46+php 5.2.14 (FastCGI) server under 30,000 concurrent connection, open 10 Nginx process consumes 150M memory (15M10=150m), open 64 php-cgi process consumes 1280M memory (20M 64=1280m), combined with the memory consumed by the
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.