Skip to content

Commit

Permalink
chore: opt uwsgi
Browse files Browse the repository at this point in the history
  • Loading branch information
Ehco1996 committed Jan 21, 2024
1 parent fe77572 commit 33c6f07
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions uwsgi.ini
Original file line number Diff line number Diff line change
@@ -1,10 +1,23 @@
; check https://www.bloomberg.com/company/stories/configuring-uwsgi-production-deployment/

[uwsgi]
strict = true
master = true
enable-threads = false
vacuum = true ; Delete sockets during shutdown
single-interpreter = false
die-on-term = true ; Shutdown when receiving SIGTERM (default is respawn)
need-app = true

socket = 0.0.0.0:8080
http = 0.0.0.0:8000
module = apps.wsgi:application
pidfile = /tmp/django-sspanel.pid
module = apps.wsgi

enable-threads = true
workers = 2
log-x-forwarded-for = true
; Logging
disable-logging = true
log-4xx = true
log-5xx = true

; Process Management
max-requests = 1000 ; Restart workers after this many requests
max-worker-lifetime = 3600 ; Restart workers after this many seconds

0 comments on commit 33c6f07

Please sign in to comment.