1, PHP slow script log intermittent 502, is caused by the failure of the back-end PHP-FPM, intermittent 502 is generally considered to be caused by the restart of the PHP-FPM process. An intermittent 502 error occurs when the number of child
PHP-FPM ConfigurationUnlike lamp, in the LNMP architecture, PHP-FPM exists as an independent service, and since it is an independent service, he has his own configuration file. The configuration file for PHP-FPM is/usr/local/php-fpm/etc/.Pool (pool)
1. php Slow Script Log
Intermittent 502, is caused by the backend php-fpm is not available, the intermittent 5,021-like is due to the PHP-FPM process restart.
An intermittent 502 error occurs when the number of PHP-FPM in a
The pool of PHP-FPM
NIGNX can configure multiple virtual hosts, PHP-FPM also support the configuration of multiple pool, each pool can listen to a port, can also listen to a socket.
PHP-FPM Configuration Instructions:
Unlike
PHP Tutorial Configuration Chinese Narration
Let's see what you see, php.ini.
[PHP]
;;;;;;;;;;;; WARNING;;;;;;;;;;;;; This is the default settings file for new PHP installations.; By default, PHP installs itself with a configuration suitable for;
12.21 PHP-FPM's PoolTo avoid the pool problem caused by one site failure due to multiple sites using the same pool, and to affect the normal operation of other sites using the same pool, configure a separate pool for each site.Add Pool to PHP-FPMTo
The pool of PHP-FPMWhen a lot of PHP sites share a pool, if one of the sites affect the pool, will cause other sites also problems, in order to avoid this problem, need to create a new pool for each site, isolation, security services1, [[email
12.21 PHP-FPM's PoolPHP-FPM supports the definition of multiple pool, each of which can listen to different sockets or different TCP/IP;If Nginx has a number of different sites, then each site can use a pool;If all the sites are using the same pool,
1 , log php error logsThe difference between display_errors and log_errorsDisplay_errorsError echo, commonly used in development mode, but many applications also forget to turn off this option in a formal environment. Error echo can expose a lot of
Although through Nginx Accesslog can record user access to an interface or the time spent on a webpage, but can not be clearly traced to the specific location or the function is slow, so through the php-fpm slow log, Slowlog setting allows us to see
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.