Gunicorn启动时 nginx 400 request line is too large (4360 4094)

Posted jihite

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Gunicorn启动时 nginx 400 request line is too large (4360 4094)相关的知识,希望对你有一定的参考价值。

设置gunicorn 参数
--limit-request-line 8188 (默认是4094)

参考

limit_request_line
--limit-request-line INT
4094
The maximum size of HTTP request line in bytes.

This parameter is used to limit the allowed size of a client’s HTTP request-line. Since the request-line consists of the HTTP method, URI, and protocol version, this directive places a restriction on the length of a request-URI allowed for a request on the server. A server needs this value to be large enough to hold any of its resource names, including any information that might be passed in the query part of a GET request. Value is a number from 0 (unlimited) to 8190.

This parameter can be used to prevent any DDOS attack.

 

以上是关于Gunicorn启动时 nginx 400 request line is too large (4360 4094)的主要内容,如果未能解决你的问题,请参考以下文章

对文件进行更改时重新启动 Gunicorn/Nginx

Nginx 在 /socket.io 请求上返回 400

Django/gunicorn/nginx: 403 禁止

gunicorn 使用主管启动时会引发数据库错误,手动启动时是不是正常工作?

Nginx Django 和 Gunicorn。 Gunicorn 袜子文件丢失?

用gunicorn+gevent启动Flask项目