/tmp/php-cgi-71.sock

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;
}

以上是/tmp/php-cgi-71.sock的全部内容。
THE END
分享
二维码
< <上一篇
下一篇>>