[Solved] Nginx error

Error log

/v3.0/uploadIdentityPhoto.security HTTP/1.1", host: "xc-loan.nflow.internal"
2021/11/01 15:01:50 [warn] 1028#1028: *57622584 a client request body is buffered to a temporary file /tmp/client-body/0000003122, client: 240e:434:620:c52d:750e:9df0:6367:175b, server: xc-loan.nflow.internal, request: "POST /loan-web/api/common/user/v3.0/uploadIdentityPhoto.security HTTP/1.1", host: "xc-loan.nflow.internal"
2021/11/01 15:01:56 [warn] 1028#1028: *57622673 a client request body is buffered to a temporary file /tmp/client-body/0000003123, client: 2408:844f:7311:47b9:2cea:adff:fe0e:7242, server: xc-loan.nflow.internal, request: "POST /loan-web/api/common/user/v3.0/uploadIdentityPhoto.security HTTP/1.1", host: "xc-loan.nflow.internal"
2021/11/01 15:02:05 [warn] 1028#1028: *57622830 a client request body is buffered to a temporary file /tmp/client-body/0000003124, client: 125.112.37.67, server: xc-loan.nflow.internal, request: "POST /loan-web/api/common/user/v4.0/commonFaceVerify.security HTTP/1.1", host: "xc-loan.nflow.internal"

Solution:

data:
  client-body-buffer-size: 256k
  proxy-body-size: 25m

In addition, it is not recommended to set these two values too large, because this will cause slow page loading, waste traffic and poor user experience. You should consider compressing the image

client_body_buffer_size   Sets the buffer size of the client request body. If the request body is larger than the buffer, the whole or part of the request body will be written to a temporary file. The default buffer size is equal to two memory pages, 8K on X86, x86-64 and other 32-bit platforms, and 16K on 64 bit platforms

client_body_max_Size sets the maximum allowable size of the client request body (the size specified in the “content length” request header). If the size in the request exceeds the configured value (i.e. client_max_body_size), an error code of 413 (the request entity is too large) will be returned to the client. It should be noted that the browser cannot display this error correctly. Setting the size to 0 disables checking the client request body size

Similar Posts: