Skip to content

Commit

Permalink
Configure uwsgi for small resource (#731)
Browse files Browse the repository at this point in the history
* Configure uwsgi for small resource

* Bump version 4.9.4
  • Loading branch information
meomancer authored Nov 6, 2024
1 parent 7c11732 commit fd93fed
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
11 changes: 5 additions & 6 deletions deployment/docker/uwsgi.conf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ module = core.wsgi
master = true
pidfile=/tmp/django.pid
workers = 4
cheaper = 2
env = DJANGO_SETTINGS_MODULE=core.settings.prod
memory-report = true
harakiri = 4800
Expand All @@ -28,15 +27,15 @@ py-callos-afterfork = true ; allow workers to trap signals

max-requests = 1000 ; Restart workers after this many requests
max-worker-lifetime = 3600 ; Restart workers after this many seconds
reload-on-rss = 2048 ; Restart workers after this much resident memory
reload-on-rss = 1024 ; Restart workers after this much resident memory
worker-reload-mercy = 60 ; How long to wait before forcefully killing workers

cheaper-algo = busyness
processes = 128 ; Maximum number of workers allowed
cheaper = 8 ; Minimum number of workers allowed
cheaper-initial = 16 ; Workers created at startup
processes = 10 ; Maximum number of workers allowed
cheaper = 2 ; Minimum number of workers allowed
cheaper-initial = 4 ; Workers created at startup
cheaper-overload = 1 ; Length of a cycle in seconds
cheaper-step = 16 ; How many workers to spawn at a time
cheaper-step = 1 ; How many workers to spawn at a time

cheaper-busyness-multiplier = 30 ; How many cycles to wait before killing workers
cheaper-busyness-min = 20 ; Below this threshold, kill workers (if stable for multiplier cycles)
Expand Down
2 changes: 1 addition & 1 deletion django_project/version/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.9.3
4.9.4

0 comments on commit fd93fed

Please sign in to comment.