duanoucuo7045 2017-09-04 08:45
浏览 547

Php-fpm没有从NGINX收到“客户端过早关闭的连接”

I have nginx version: 1.12.0 and the following configuration:

http {
 server {

  listen      443;
  server_name SERVER_NAME_OR_IP;

  access_log  /var/log/nginx/access.log;
  error_log  /var/log/nginx/error.log  debug;

  ssl                  on;
  ssl_certificate      /path/to/cert.crt;
  ssl_certificate_key  /path/to/cert.key;
  ssl_protocols        TLSv1 TLSv1.1 TLSv1.2;

  location ~* /test/abcd/ {

    proxy_pass http://127.0.0.1:7000;
    proxy_set_header        Host            $http_host;
    proxy_set_header        X-Real-IP       $remote_address;
    proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;

  }
 }
 server {
   listen       127.0.0.1:7000;
   server_name  SERVER_NAME_OR_IP;

   location / {

     location ~ \.php$ {
       fastcgi_pass   127.0.0.1:9000;
       fastcgi_index  index.php;
       fastcgi_param  SCRIPT_FILENAME  $request_filename;
       fastcgi_param   PHP_VALUE "upload_max_filesize = 3072M 
 post_max_size=3072M";
       include        /etc/nginx/fastcgi_params;
     }
   }
}

If the client closes connection during uploading a file, I see in /var/log/error.log : "epoll_wait() reported that client prematurely closed connection, so upstream connection is closed too while sending request to upstream" and "client prematurely closed connection" . My problem is that php-fpm doesn't receive that error when client closes connection, so I can't catch this error in my code. Do you know what might be the problem?

Thank You!

  • 写回答

0条回答

    报告相同问题?

    悬赏问题

    • ¥20 delta降尺度方法,未来数据怎么降尺度
    • ¥15 c# 使用NPOI快速将datatable数据导入excel中指定sheet,要求快速高效
    • ¥15 再不同版本的系统上,TCP传输速度不一致
    • ¥15 高德地图点聚合中Marker的位置无法实时更新
    • ¥15 DIFY API Endpoint 问题。
    • ¥20 sub地址DHCP问题
    • ¥15 delta降尺度计算的一些细节,有偿
    • ¥15 Arduino红外遥控代码有问题
    • ¥15 数值计算离散正交多项式
    • ¥30 数值计算均差系数编程