Nginx client intended to send too large body
2016-11-10 by dongnan
错误描述
客户端(浏览器)上传 100MB文件到服务器(nginx),nginx 报错 client intended to send too large body,详细日志如下:
2016/10/25 18:00:14 [error] 9581#0: *44656 client intended to send too large body: 98892639 bytes, 
client: 123.124.1XX.2XX, server: d.ywwd.net, request: "POST /file/upload HTTP/1.1", host: "d.ywwd.net", 
referrer: "http://d.ywwd.net/file/profile?userId=1225"
解决方法
尝试调整 nginx 配置文件中的 client_max_body_size 参数,例如 256MB:
{
    # ...省略
    client_max_body_size 256m;
    # ...省略
}
重启nginx 进程
nginx -t && nginx -s reload