Skip to content

Commit b5cabbb

Browse files
committed
Reload workers after a specified amount of requests
1 parent b37b59c commit b5cabbb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,3 +183,6 @@ ENV PATH=/code/venv/bin:$PATH
183183
WORKDIR /code
184184

185185
CMD ["python", "/code/manage.py", "runserver", "0.0.0.0:8000"]
186+
187+
# Reload workers after the specified amount of managed requests (avoid memory leaks)
188+
ENV UWSGI_MAX_REQUESTS=1000

0 commit comments

Comments
 (0)