首页 新闻 会员 周边 捐助

/tmp/php-cgi-71.sock

0
悬赏园豆:200 [已解决问题] 解决于 2021-03-15 09:31

2021/03/11 13:51:06 [error] 2209#0: *1251111 connect() to unix:/tmp/php-cgi-71.sock failed (11: Resource temporarily unavailable) while connecting to upstream, client: 110.24.15.5, server: app.xxx.cn, request: "GET /api/order/getAuth?uuid=fexasdq&verify=MDAwMDAwMDAwMMbarGHJZ4uxmImynrCfumay372wsH5gcg&ver=3.0.0.202103090 HTTP/1.1", upstream: "fastcgi://unix:/tmp/php-cgi-71.sock:", host: "app.baidu:17008"

正常时候不会有这个报错,请求量每秒50000~60000左右就会报错,还有加负载均衡会报错

问题补充:

【PHP配置】
listen = /tmp/php-cgi-71.sock
listen.backlog = 8192
listen.allowed_clients = 127.0.0.1
listen.owner = www
listen.group = www
listen.mode = 0666
user = www
group = www
pm = static
pm.status_path = /phpfpm_71_status
pm.max_children = 200
pm.start_servers = 15
pm.min_spare_servers = 15
pm.max_spare_servers = 50
request_terminate_timeout = 100
request_slowlog_timeout = 30
slowlog = var/log/slow.log

【nginx配置】
user www www;
worker_processes auto;
error_log /www/wwwlogs/nginx_error.log crit;
pid /www/server/nginx/logs/nginx.pid;
worker_rlimit_nofile 51200;

events
{
use epoll;
worker_connections 51200;
multi_accept on;
}

http
{
include mime.types;
#include luawaf.conf;

	include proxy.conf;

    default_type  application/octet-stream;

    server_names_hash_bucket_size 512;
    client_header_buffer_size 32k;
    large_client_header_buffers 4 32k;
    client_max_body_size 50m;

    sendfile   on;
    tcp_nopush on;

    keepalive_timeout 60;

    tcp_nodelay on;

    fastcgi_connect_timeout 300;
    fastcgi_send_timeout 300;
    fastcgi_read_timeout 300;
    fastcgi_buffer_size 64k;
    fastcgi_buffers 4 64k;
    fastcgi_busy_buffers_size 128k;
    fastcgi_temp_file_write_size 256k;
	fastcgi_intercept_errors on;

    gzip on;
    gzip_min_length  1k;
    gzip_buffers     4 16k;
    gzip_http_version 1.1;
    gzip_comp_level 2;
    gzip_types     text/plain application/javascript application/x-javascript text/javascript text/css application/xml;
    gzip_vary on;
    gzip_proxied   expired no-cache no-store private auth;
    gzip_disable   "MSIE [1-6]\.";

    limit_conn_zone $binary_remote_addr zone=perip:10m;
	limit_conn_zone $server_name zone=perserver:10m;

    server_tokens off;
    access_log off;

include /www/server/panel/vhost/nginx/*.conf;
}

php的自我修养的主页 php的自我修养 | 初学一级 | 园豆:8
提问于:2021-03-11 14:26
< >
分享
最佳答案
0
收获园豆:200
ycyzharry | 高人七级 |园豆:25683 | 2021-03-12 23:55
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册