Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid Memory Leaks [No ClickUp ticket] #275

Merged
merged 2 commits into from
Nov 2, 2023
Merged

Conversation

ronardcaktus
Copy link
Member

This PR enables reloading workers after a specified amount of managed requests - 1000 - to avoid memory leaks.

@ronardcaktus ronardcaktus changed the title Avoid Memory Leaks Avoid Memory Leaks [No ClickUp ticket] Oct 30, 2023
Dockerfile Outdated
@@ -183,3 +183,6 @@ ENV PATH=/code/venv/bin:$PATH
WORKDIR /code

CMD ["python", "/code/manage.py", "runserver", "0.0.0.0:8000"]

# Reload workers after the specified amount of managed requests (avoid memory leaks)
ENV UWSGI_MAX_REQUESTS=1000
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we set this earlier on in the file, before we start uWSGI?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yes, I think it should be up by line 89

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I moved it up. Great suggestion @dchukhin. I moved it 🆙.

Copy link
Contributor

@dchukhin dchukhin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1️⃣0️⃣0️⃣0️⃣

@ronardcaktus ronardcaktus merged commit 68040f0 into develop Nov 2, 2023
1 check passed
@ronardcaktus ronardcaktus deleted the max-requests branch November 2, 2023 13:38
ronardcaktus added a commit that referenced this pull request Feb 14, 2024
Avoid Memory Leaks [No ClickUp ticket]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants