附件上传提示413 Request Entity Too Large

Blade 未结 1 201
2930417211
2930417211 剑者 2023-12-14 14:13
悬赏:5

一、该问题的重现步骤是什么?

1. 使用资源管理对象存储上传调试功能,文件大小340M

2. 点击上传

image.png


二、你期待的结果是什么?实际看到的又是什么?

期待附件可以上传成功,实际提示Request Entity Too Large,但是在oss中看到附件已经上传成功。

上传100M大小的文件是可以成功。


三、你正在使用的是什么产品,什么版本?在什么操作系统上?

bladex3.1.0,服务部署在centos7.6,客户端使用macOS


四、请提供详细的错误堆栈信息,这很重要。

  1. 上传通过Nginx进行方向代理,也配置了client_max_body_size相关配置。


五、若有更多详细信息,请在下面提供。

Nginx配置:

Nginx错误日志如下:

Nginx错误日志:

2023/12/14 13:36:16 [warn] 5787#5787: *20049 a client request body is buffered to a temporary file /var/cache/nginx/client_temp/0000000028, client: 192.168.1.138, server: 192.168.1.41, request: "POST /api/blade-resource/oss/endpoint/put-file-attach HTTP/1.1", host: "192.168.1.41:7022", referrer: "http://192.168.1.41:7022/"

2023/12/14 13:38:10 [error] 5787#5787: *20049 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 192.168.1.138, server: 192.168.1.41, request: "POST /api/blade-resource/oss/endpoint/put-file-attach HTTP/1.1", upstream: "http://192.168.1.36:180/blade-resource/oss/endpoint/put-file-attach", host: "192.168.1.41:7022", referrer: "http://192.168.1.41:7022/"

2023/12/14 13:38:10 [error] 5787#5787: *20049 client intended to send too large body: 347699906 bytes, client: 192.168.1.138, server: 192.168.1.41, request: "POST /api/blade-resource/oss/endpoint/put-file-attach HTTP/1.1", upstream: "http://192.168.1.36:180/blade-resource/oss/endpoint/put-file-attach", host: "192.168.1.41:7022", referrer: "http://192.168.1.41:7022/"


提示 upstream timed out (110: Connection timed out) while reading response header from upstream。查了相关资料说是上游服务连接超时导致

增加如下配置无法解决

proxy_connect_timeout      300;
proxy_send_timeout         300;

Blade-Gateway日志:

image.png

Blade-Resource日志:

image.png


1条回答
提交回复