openresty版本openresty-1.9.15.1.tar.gz

最开始遇到的问题是

nginx配置文件设置的是
client_max_body_size 1G;

单是上传一个200M的文件的时候就会报413的错误
<html>
    <head>
        <title>413 Request Entity Too Large</title>
    </head>
    <body bgcolor="white">
        <center>
            <h1>413 Request Entity Too Large</h1>
        </center>
        <hr>
        <center>nginx/1.9.14</center>
    </body>
</html>

而且nginx中没有任何access和error日志

之后我尝试把client_max_body_size设置为1M 上传一个2M的文件虽然同样会报413单是和上面的错误不太一样
<html>
    <head>
        <title>413 Request Entity Too Large</title>
    </head>
    <body bgcolor="white">
        <center>
            <h1>413 Request Entity Too Large</h1>
        </center>
        <hr>
        <center>openresty/1.9.15.1</center>
    </body>
</html>

center里面的内容不一样,而且有日志

==> ./openresty-file.error.log <==

2016/08/19 19:56:55 [error] 167975#0: *393 client intended to send too large body: 2376936 bytes, client: 172.16.158.8, server: , request: "POST /callback/bank/upload HTTP/1.0", host: "test.loans.upload-file.t.bbtfax.com"

==> ./openresty-file.access.log <==

172.16.158.8 - - [19/Aug/2016:19:56:55 +0800] "POST /callback/bank/upload HTTP/1.0" 413 607 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36"


可能是什么原因呢?请求帮助,谢谢。





    2016-08-19 19:57 GMT+08:00 策张 <zhang...@gmail.com>:
    openresty版本openresty-1.9.15.1.tar.gz

    最开始遇到的问题是

    nginx配置文件设置的是
    client_max_body_size 1G;

    单是上传一个200M的文件的时候就会报413的错误
    <html>
        <head>
            <title>413 Request Entity Too Large</title>
        </head>
        <body bgcolor="white">
            <center>
                <h1>413 Request Entity Too Large</h1>
            </center>
            <hr>
            <center>nginx/1.9.14</center>
        </body>
    </html>

    而且nginx中没有任何access和error日志

    nginx 中没有 access、error 日志,我这里遇到这种情况大多是磁盘空间不足导致各种异常。
    是否有可能你的磁盘空间不足 1G 了?

    对于请求 body 大小,还有另外一个参数 client_body_buffer_size 控制 body 在内存中缓冲区,一旦文件体积超过缓冲区大小,nginx 会把 body 数据存到本地磁盘进而占用磁盘空间。


    之后我尝试把client_max_body_size设置为1M 上传一个2M的文件虽然同样会报413单是和上面的错误不太一样
    <html>
        <head>
            <title>413 Request Entity Too Large</title>
        </head>
        <body bgcolor="white">
            <center>
                <h1>413 Request Entity Too Large</h1>
            </center>
            <hr>
            <center>openresty/1.9.15.1</center>
        </body>
    </html>

    center里面的内容不一样,而且有日志

    ==> ./openresty-file.error.log <==

    2016/08/19 19:56:55 [error] 167975#0: *393 client intended to send too large body: 2376936 bytes, client: 172.16.158.8, server: , request: "POST /callback/bank/upload HTTP/1.0", host: "test.loans.upload-file.t.bbtfax.com"

    ==> ./openresty-file.access.log <==

    172.16.158.8 - - [19/Aug/2016:19:56:55 +0800] "POST /callback/bank/upload HTTP/1.0" 413 607 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36"


    可能是什么原因呢?请求帮助,谢谢。



    --



    --

    YuanSheng Wang
    ---------------------------------------
    OpenResty lover ^_^
      你确定两次走的都是同一个端口,同一个 NGINX 服务吗?看第一次返回的是 NGINX,第二次返回的是 openresty

      在 2016年8月19日 下午7:57,策张 <zhang...@gmail.com>写道:
      openresty版本openresty-1.9.15.1.tar.gz

      最开始遇到的问题是

      nginx配置文件设置的是
      client_max_body_size 1G;

      单是上传一个200M的文件的时候就会报413的错误
      <html>
          <head>
              <title>413 Request Entity Too Large</title>
          </head>
          <body bgcolor="white">
              <center>
                  <h1>413 Request Entity Too Large</h1>
              </center>
              <hr>
              <center>nginx/1.9.14</center>
          </body>
      </html>

      而且nginx中没有任何access和error日志

      之后我尝试把client_max_body_size设置为1M 上传一个2M的文件虽然同样会报413单是和上面的错误不太一样
      <html>
          <head>
              <title>413 Request Entity Too Large</title>
          </head>
          <body bgcolor="white">
              <center>
                  <h1>413 Request Entity Too Large</h1>
              </center>
              <hr>
              <center>openresty/1.9.15.1</center>
          </body>
      </html>

      center里面的内容不一样,而且有日志

      ==> ./openresty-file.error.log <==

      2016/08/19 19:56:55 [error] 167975#0: *393 client intended to send too large body: 2376936 bytes, client: 172.16.158.8, server: , request: "POST /callback/bank/upload HTTP/1.0", host: "test.loans.upload-file.t.bbtfax.com"

      ==> ./openresty-file.access.log <==

      172.16.158.8 - - [19/Aug/2016:19:56:55 +0800] "POST /callback/bank/upload HTTP/1.0" 413 607 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36"


      可能是什么原因呢?请求帮助,谢谢。



      --

        找到原因了 请求的域名是被另一个nginx转发到指定ip的,上传过大文件的时候是被域名转发的nginx服务中断了

        On Monday, August 22, 2016 at 10:00:34 AM UTC+8, WenMing wrote:
        你确定两次走的都是同一个端口,同一个 NGINX 服务吗?看第一次返回的是 NGINX,第二次返回的是 openresty

        在 2016年8月19日 下午7:57,策张 <zhang...@gmail.com>写道:
        openresty版本openresty-1.9.15.1.tar.gz

        最开始遇到的问题是

        nginx配置文件设置的是
        client_max_body_size 1G;

        单是上传一个200M的文件的时候就会报413的错误
        <html>
            <head>
                <title>413 Request Entity Too Large</title>
            </head>
            <body bgcolor="white">
                <center>
                    <h1>413 Request Entity Too Large</h1>
                </center>
                <hr>
                <center>nginx/1.9.14</center>
            </body>
        </html>

        而且nginx中没有任何access和error日志

        之后我尝试把client_max_body_size设置为1M 上传一个2M的文件虽然同样会报413单是和上面的错误不太一样
        <html>
            <head>
                <title>413 Request Entity Too Large</title>
            </head>
            <body bgcolor="white">
                <center>
                    <h1>413 Request Entity Too Large</h1>
                </center>
                <hr>
                <center>openresty/1.9.15.1</center>
            </body>
        </html>

        center里面的内容不一样,而且有日志

        ==> ./openresty-file.error.log <==

        2016/08/19 19:56:55 [error] 167975#0: *393 client intended to send too large body: 2376936 bytes, client: 172.16.158.8, server: , request: "POST /callback/bank/upload HTTP/1.0", host: "test.loans.upload-file.t.bbtfax.com"

        ==> ./openresty-file.access.log <==

        172.16.158.8 - - [19/Aug/2016:19:56:55 +0800] "POST /callback/bank/upload HTTP/1.0" 413 607 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36"


        可能是什么原因呢?请求帮助,谢谢。



        --

          Write a Reply...