Nginx:a client request body is buffered to a temporary file

https://www.cnblogs.com/iAmSoScArEd/p/18225191

Nginx warn:
2024/05/31 19:28:37 [warn] 8467#0: *9505669 a client request body is buffered to a temporary file /usr/local/openresty/nginx/client_body_temp/0002098837, client: 10.xx.xx.xx, server: xxx.xx.com, request: "POST /xxx HTTP/1.1", host: "xxx.xx.com:443"
解决:
proxy_pass的location下面新增两个配置
client_max_body_size 100m; #允许HTTP body文件大小 根据情况修改,将会影响上传文件,上传文件大于100m的将报413
client_body_buffer_size 50m; #文件proxy 内存buffer,小于这个buffer的数据直接在内存中转发,大于这个数值将存储在/usr/local/openresty/nginx/client_body_temp/报错提示的这个临时目录中

posted @ 2024-05-31 19:37  我超怕的  阅读(58)  评论(0编辑  收藏  举报