upstream prematurely closed connection while reading response header from upstream

2018-05-08 17:57:01 +08:00
 wayne0426

wordpress 上传文件 2018/05/08 17:36:18 [error] 15016#0: *709 upstream prematurely closed connection while reading response header from upstream, client: 14.156.36.104, server: www.xxx.com, request: "POST /wp-admin/async-upload.php HTTP/2.0", upstream: "fastcgi://unix:/tmp/php-cgi-56.sock:", host: "www.xxx.com", referrer: "https://www.xxx.com/wp-admin/upload.php"

各版本号 wordpress centos 7 64 nginx:nginx-tengine2.2 php:5.6

nginx.conf 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 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 500m;

    sendfile   on;
    tcp_nopush on;

    keepalive_timeout 60;
    tcp_nodelay on;

    #缓存被频繁访问的文件相关的信息
    open_file_cache max=200000 inactive=20s;
    open_file_cache_valid 30s;
    open_file_cache_min_uses 2;
    open_file_cache_errors on;

    fastcgi_connect_timeout 300;
    fastcgi_send_timeout 300;
    fastcgi_read_timeout 300;
    fastcgi_buffer_size 256k;
    fastcgi_buffers 16 256k;
    fastcgi_busy_buffers_size 512k;
    fastcgi_temp_file_write_size 512k;
    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;

server { listen 888; server_name www.bt.cn; index index.html index.htm index.php; root /www/server/stop;

    #error_page   404   /404.html;
    include enable-php.conf;

    location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
    {
        expires      30d;
    }

    location ~ .*\.(js|css)?$
    {
        expires      12h;
    }

    location ~ /\.
    {
        deny all;
    }

    access_log  /www/wwwlogs/access.log;
}

server { listen 80 default; return 444; }

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

keepalive_timeout 设置到 600 也不行。 通过修改 proxy.conf 也不行。

4195 次点击
所在节点    WordPress
0 条回复

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/453167

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX