php-fpm.sock falhou (11: Recurso temporariamente indisponível) ao conectar-se ao upstream

4

Estou com os seguintes erros no meu site quando testo 200 acessos por segundo.

Primeiro recebi 499 erros

2017-04-09 03:22:45 Error 162.158.79.219 499 GET / HTTP/1.1 0 nginx access

2017-04-09 03:22:45 Error 162.158.79.87 499 GET / HTTP/1.1 0 nginx access

2017-04-09 03:22:45 Error 162.158.78.170 499 GET / HTTP/1.1 0 nginx access

2017-04-09 03:22:45 Error 162.158.78.68 499 GET / HTTP/1.1 0 nginx access

2º erro começa a mostrar 502

2017-04-09 03:22:45 Error 162.158.79.135 502 GET / HTTP/1.1 166 nginx access

2017-04-09 03:22:45 Error 162.158.79.225 502 GET / HTTP/1.1 166 nginx access

2017-04-09 03:22:45 Error 162.158.78.110 502 GET / HTTP/1.1 166 nginx access

2017-04-09 03:22:45 Error 162.158.79.225 502 GET / HTTP/1.1 166 nginx access

e finalmente eu começo a receber php-fpm.sock failed errors

2017-04-09 03:22:45 Error 162.158.79.207 20699#0: *3826365 connect() to unix:///var/www/vhosts/system/playhdpk.top/php-fpm.sock failed (11: Resource temporarily unavailable) while connecting to upstream nginx error

2017-04-09 03:22:45 Error 162.158.79.207 20695#0: *3826367 connect() to unix:///var/www/vhosts/system/playhdpk.top/php-fpm.sock failed (11: Resource temporarily unavailable) while connecting to upstream nginx error

2017-04-09 03:22:45 Error 162.158.79.207 20697#0: *3826369 connect() to unix:///var/www/vhosts/system/playhdpk.top/php-fpm.sock failed (11: Resource temporarily unavailable) while connecting to upstream nginx error

Meu php-fpm-pool-settings está abaixo, acredito que este esteja gerando erros, posso estar errado

listen.backlog = 65535

;[php-fpm-pool-settings]
pm = dynamic
pm.max_children = 5000
pm.start_servers = 50
pm.min_spare_servers = 20
pm.max_spare_servers = 70
pm.max_requests = 2000

Meu nginx conf está abaixo

user  nginx;
worker_processes 8;

# number of file descriptors used for nginx
# the limit for the maximum FDs on the server is usually set by the OS.
# if you don't set FD's then OS settings will be used which is by default 2000
worker_rlimit_nofile 99999;

error_log /var/log/nginx/error.log crit;

include /etc/nginx/modules.conf.d/*.conf;

events {

    worker_connections 16192;
    use epoll;
    multi_accept on;
}


http {
    include   mime.types;
    default_type  application/octet-stream;

    open_file_cache max=2048 inactive=20s;
    open_file_cache_valid 30s;
    open_file_cache_min_uses 5;
    open_file_cache_errors off;


    sendfile on;
    tcp_nopush on;
    tcp_nodelay on;
    keepalive_requests 100000;
    reset_timedout_connection on;
    client_body_timeout 30;
    send_timeout 15;

    client_header_timeout 12;
    proxy_connect_timeout  600s;
    proxy_send_timeout  600s;
    proxy_read_timeout  600s;

    fastcgi_buffers 8 128k;
    fastcgi_buffer_size 256k;
    fastcgi_send_timeout 600s;
    fastcgi_read_timeout 600s;

    types_hash_max_size 2048;

    gzip on;
    gzip_min_length 1000;
    gzip_proxied expired no-cache no-store private auth;
    gzip_types application/x-javascript text/css application/javascript text/javascript text/plain text/xml application/json application/v$
    gzip_disable "MSIE [1-6]\.(?!.*SV1)";


    server_tokens off;

    include /etc/nginx/conf.d/*.conf;
}

Observação : as especificações do servidor estão abaixo

OS CentOS 7.3

Processador: Intel Xeon E5-1620v2 - 4c / 8t - 3,7 GHz / 3,9 GH

Sever Ram: 64 GB DDR3

    
por Hassaan 09.04.2017 / 00:49

1 resposta

2

Não limite solicitações Dê-lhes trabalho grátis)

pm = ondemand
pm.max_children = 4000
pm.start_servers = 10
pm.min_spare_servers = 10
pm.max_requests = 0
    
por 14.04.2017 / 01:50