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 蓝牙耳机怎么查看日志
    • ¥15 Fluent齿轮搅油
    • ¥15 八爪鱼爬数据为什么自己停了
    • ¥15 交替优化波束形成和ris反射角使保密速率最大化
    • ¥15 树莓派与pix飞控通信
    • ¥15 自动转发微信群信息到另外一个微信群
    • ¥15 outlook无法配置成功
    • ¥30 这是哪个作者做的宝宝起名网站
    • ¥60 版本过低apk如何修改可以兼容新的安卓系统
    • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏