LINUX.ORG.RU

Избранные сообщения glaberzu

nginx, php-fpm и периодическая ошибка 502

Форум — Admin

на сайте постоянно выскакивает ошибка 502, особенно часто её схватывают поисковые боты, при этом в error.log валится сообщение:

2015/07/22 15:05:21 [warn] 4390#4390: *1682 upstream server temporarily disabled while reading response header from upstream, client: 66.249.92.62, server:

php/fpm/pool.d/site.conf

user = nginx
group = nginx
listen = /var/run/fpm.sock
listen.owner = nginx
listen.group = nginx

pm = static
pm.max_children = 64
pm.max_requests = 10240
pm.process_idle_timeout = 10s
chdir = /

slowlog = /var/log/php5-fpm-slow.log
request_slowlog_timeout = 10s

php_admin_value[memory_limit] = 1024M
php_admin_flag[short_open_tag] = On
php_admin_value[date.timezone] = Europe/Moscow
php_admin_value[post_max_size] = 512M
php_admin_value[max_execution_time] = 600
php_admin_value[max_input_vars] = 6000

nginx:

    location ~ \.php {
        fastcgi_pass  php;
        fastcgi_read_timeout 600;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;
        fastcgi_buffers 16 128k;
        fastcgi_buffer_size 128k;
        fastcgi_max_temp_file_size 0;

Версии:

~ # cat /etc/debian_version 
8.1

~ # php5-fpm -v
PHP 5.6.9-0+deb8u1 (fpm-fcgi) (built: Jun  5 2015 11:03:52)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies
    with Zend OPcache v7.0.4-dev, Copyright (c) 1999-2015, by Zend Technologies

~ # nginx -v
nginx version: nginx/1.9.3

 ,

Acceptor
()