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条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 如何在scanpy上做差异基因和通路富集?
    • ¥20 关于#硬件工程#的问题,请各位专家解答!
    • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
    • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
    • ¥30 截图中的mathematics程序转换成matlab
    • ¥15 动力学代码报错,维度不匹配
    • ¥15 Power query添加列问题
    • ¥50 Kubernetes&Fission&Eleasticsearch
    • ¥15 報錯:Person is not mapped,如何解決?
    • ¥15 c++头文件不能识别CDialog