From fbfcf7b7205a55fcee0e9f7882550e8ccdb2fd9b Mon Sep 17 00:00:00 2001 From: Vadim Stepanov Date: Fri, 25 Aug 2023 17:18:37 +0100 Subject: [PATCH] Prevent uWSGI from consuming too much memory (#2884) # What this PR does Fixes https://github.com/grafana/oncall/issues/1521 (see https://github.com/unbit/uwsgi/issues/2299) ## Checklist - [x] Unit, integration, and e2e (if applicable) tests updated - [x] Documentation added (or `pr:no public docs` PR label added if not required) - [x] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not required) --- engine/uwsgi.ini | 3 +++ 1 file changed, 3 insertions(+) diff --git a/engine/uwsgi.ini b/engine/uwsgi.ini index 2103d899..66d4892a 100644 --- a/engine/uwsgi.ini +++ b/engine/uwsgi.ini @@ -95,6 +95,9 @@ die-on-term=true ; every request. It is not so slow, but with some kind of app/extensions that could be overkill. single-interpreter=true +; Prevent uWSGI from consuming too much memory: https://github.com/grafana/oncall/issues/1521 +max-fd=1048576 + 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}