client intended to send too large body

nginx报错:

10.148.76.11 - - [07/Dec/2023:14:27:47 +0800] "POST /v1/txt2img HTTP/1.1" 200 1439595 "-" "python-requests/2.31.0" "58.144.221.164"
2023/12/07 14:27:47 [error] 129#129: *730054 client intended to send too large body: 1899715 bytes, client: 10.148.76.14, server: api.test.com, request: "POST /v1/png-info HTTP/1.1", host: "api.test.com"
10.148.76.14 - - [07/Dec/2023:14:27:47 +0800] "POST /v1/png-info HTTP/1.1" 413 183 "-" "python-requests/2.31.0" "58.144.221.164"

分析:

在nginx使用过程中,上传文件的过程中,nginx报文大小限制,出现413 Request Entity Too Large。

我们需要在nginx http中设置client_max_body_size,默认值是1m。

设置完成后,使用nginx -s reload没生效,使用restart才生效。

  • 7
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
2023/07/24 15:14:58 [error] 721#0: *763 client intended to send too large body: 113069413 bytes, client: 101.83.232.139, server: hetx.top, request: "PUT /index.php/dav/my/%E6%96%87%E4%BB%B6/XMind2022%EF%BC%8864bit%EF%BC%89/XMind2022%EF%BC%8864bit%EF%BC%89/app.asar HTTP/2.0", host: "hetx.top" 2023/07/24 15:15:06 [error] 721#0: *763 client intended to send too large body: 113069413 bytes, client: 101.83.232.139, server: hetx.top, request: "PUT /index.php/dav/my/%E6%96%87%E4%BB%B6/XMind2022%EF%BC%8864bit%EF%BC%89/XMind2022%EF%BC%8864bit%EF%BC%89/app.asar HTTP/2.0", host: "hetx.top" 2023/07/24 15:16:12 [error] 721#0: *763 client intended to send too large body: 134120318 bytes, client: 101.83.232.139, server: hetx.top, request: "PUT /index.php/dav/my/%E6%96%87%E4%BB%B6/XMind2022%EF%BC%8864bit%EF%BC%89.7z HTTP/2.0", host: "hetx.top" 2023/07/24 15:16:40 [error] 721#0: *763 client intended to send too large body: 134120318 bytes, client: 101.83.232.139, server: hetx.top, request: "PUT /index.php/dav/my/%E6%96%87%E4%BB%B6/XMind2022%EF%BC%8864bit%EF%BC%89.7z HTTP/2.0", host: "hetx.top" 2023/07/24 15:16:43 [error] 721#0: *763 client intended to send too large body: 134120318 bytes, client: 101.83.232.139, server: hetx.top, request: "PUT /index.php/dav/my/%E6%96%87%E4%BB%B6/XMind2022%EF%BC%8864bit%EF%BC%89.7z HTTP/2.0", host: "hetx.top" 2023/07/24 15:16:45 [error] 721#0: *763 client intended to send too large body: 134120318 bytes, client: 101.83.232.139, server: hetx.top, request: "PUT /index.php/dav/my/%E6%96%87%E4%BB%B6/XMind2022%EF%BC%8864bit%EF%BC%89.7z HTTP/2.0", host: "hetx.top" 2023/07/24 15:19:37 [error] 721#0: *878 client intended to send too large body: 134120318 bytes, client: 101.83.232.139, server: hetx.top, request: "PUT /index.php/dav/my/%E6%96%87%E4%BB%B6/XMind2022%EF%BC%8864bit%EF%BC%89.7z HTTP/2.0", host: "hetx.top" 2023/07/24 15:20:30 [error] 721#0: *878 client intended to send too large body: 134120318 bytes, client: 101.83.232.139, server: hetx.top, request: "PUT /index.php/dav/my/XMind2022%EF%BC%8864bit%EF%BC%89.7z HTTP/2.0", host: "hetx.top" 2023/07/24 15:31:12 [error] 1209#0: *28 client intended to send too large body: 134120318 bytes, client: 101.83.232.139, server: hetx.top, request: "PUT /index.php/dav/my/%E6%96%87%E4%BB%B6/XMind2022%EF%BC%8864bit%EF%BC%89.7z HTTP/2.0", host: "hetx.top" 2023/07/24 15:42:10 [error] 1209#0: *110 directory index of "/www/wwwroot/hetx.top/static/" is forbidden, client: 113.142.131.55, server: hetx.top, request: "GET /static/ HTTP/1.1", host: "hetx.top"
07-25

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值