On several offline servers that are not very busy, the number of PHP-FPM processes is found to be more than 500, and some processes run for several months.
The following troubleshooting was performed to determine if there is a problem with the
generallyThe php-cgi process is not enough, PHP execution time is long (MySQL slow), or the php-cgi process is dead, there will be 502 errors;The Nginx 504 Gateway time-out is related to the nginx.conf setting;1.502 and php-fpm.confResource problems
Address: http://raocl.spaces.live.com/blog/cns! 3f6cff93fd0e3b79! 181. Entry http://edu.codepub.com/2010/0504/22510.php
Nginx 502 Bad Gateway means that the requested PHP-CGI has been executed, but the PHP-CGI process is terminated for some reason (
PHP requests data from the C ++ Server over TCP. If the concurrency of a single data request is too high, the overhead of the cgi process and TCP connection is too high. How can this problem be improved? This is mainly about cgi process overhead and
Some websites that run on Nginx sometimes appear "502 Bad Gateway" errors, even when they occur frequently. The following is a small compilation of some of the Nginx 502 error troubleshooting methods, for reference:The reason for Nginx 502 error is
See the reason may be not enough php-cgi process, PHP execution time (MySQL slow), or php-cgi process die, there will be 502 errors.
1. In the installed environment, run for a period of 502 problems, generally because the default php-cgi process is 5
Enabling multiple virtual machine websites in Nginx is the primary task. Versions earlier than PHP5.3 do not support open_basedir. You can only control the PHP-cgi process and Directory user permissions, prevents cross-site access.First, let's take
Some websites running on Nginx sometimes appear as "502 Bad Gateway" errors, some times even frequently. The following is a small compilation of some of the Nginx 502 error troubleshooting Methods for reference:
The reason for the Nginx 502 error
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/
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,
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
After the php environment is deployed, some security settings are made. in addition to being familiar with various php vulnerabilities, you can also configure php. ini to reinforce the runtime environment of PHP, and PHP has been officially modified
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配置/usr/local/php/sbin/php-fpm-t/usr/local/php/sbin/php-fpm-c /usr/local/php/etc/php.ini -y /usr/
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
To agree on several directories/usr/local/php/sbin/php-fpm/usr/local/php/etc/php-fpm.conf/usr/local/php/etc/php.ini one, php-fpm start parameters # Test PHP-FPM
To agree on several directories
/usr/local/php/sbin/php-fpm/usr/local/php/etc/php-fpm.conf/usr/local/php/etc/php.iniI. PHP-FPM startup parameters
#测试php-FPM
Iis
For an IIS server, it is not the name of the Web site that uniquely identifies a Web site, but the ID value of the site. When we create a new Web site in IIS 5.0 and IIS 4.0, the Web server assigns the next available numeric order number to the
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 parameterCopy CodeThe code is as follows:#测试php-FPM
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.