
[英]Why does large file upload fail with status 413 for my nodejs app on AWS EC2 instance?
[英]Why does large file upload fail on nginx?
我有一个 140MB 的文件无法上传到我的 nginx。
我在“服务器{}”块内的nginx.conf
中设置了以下指令。
send_timeout 30m;
proxy_read_timeout 30m;
client_max_body_size 10g;
keepalive_timeout 0;
lingering_timeout 3m;
正在上传较小的文件。 当我打开调试日志时,我在最后几条语句中看到了这些行:
[debug] 5291#0: epoll timer: -1
[debug] 4714#0: child: 3 5292 e:0 t:0 d:0 r:1 j:0
[debug] 4714#0: sigsuspend
[debug] 5292#0: epoll: fd:15 ev:0001 d:00007F9F294E72C8
[debug] 5292#0: channel: 32
[debug] 5292#0: channel command: 2
[debug] 5292#0: close channel s:0 pid:4990 our:4990 fd:10
[debug] 5292#0: channel: 32
[debug] 5292#0: channel command: 2
[debug] 5292#0: close channel s:1 pid:4991 our:4991 fd:12
[debug] 5292#0: channel: -2
[debug] 5292#0: timer delta: 141
[debug] 5292#0: worker cycle
[debug] 5292#0: epoll timer: -1
[debug] 5292#0: worker cycle
[debug] 5292#0: epoll timer: -1
修复是设置此指令:
http2_recv_timeout 3m;
我的客户端连接很慢,这就是文件没有上传到服务器的原因。 我正在使用 nginx 版本 1.22.2
就我而言,这与客户端或服务器配置无关。 这是关于 cloudflare 在他们的免费计划中不允许上传超过 100MB 的内容。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.