oncall-engine/engine/uwsgi.ini
Ildar Iskhakov d8e42c731d
Add 413 for requests with content-length > 15Mb on uwsgi (#2095)
# What this PR does

## Which issue(s) this PR fixes

## Checklist

- [ ] Unit, integration, and e2e (if applicable) tests updated
- [ ] Documentation added (or `pr:no public docs` PR label added if not
required)
- [ ] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not
required)
2023-06-05 16:43:10 +08:00

25 lines
707 B
INI

[uwsgi]
strict=true
chdir=/etc/app
module=engine.wsgi:application
master=True
pidfile=/tmp/project-master.pid
http=0.0.0.0:8080
processes=5
uid=1000
gid=2000
harakiri=620
max-requests=5000
vacuum=True
buffer-size=65535
http-auto-chunked=True
http-timeout=620
post-buffering=1
enable-threads=true
; drop requests with CONTENT_LENGTH bigger than 15MB
route-if=ishigher:${CONTENT_LENGTH};15000000 break:413 Request Entity Too Large
logger=stdio
log-format=source=engine:uwsgi status=%(status) method=%(method) path=%(uri) latency=%(secs) google_trace_id=%(var.HTTP_X_CLOUD_TRACE_CONTEXT) protocol=%(proto) resp_size=%(size) req_body_size=%(cl)
log-encoder=format ${strftime:%%Y-%%m-%%d %%H:%%M:%%S} ${msgnl}