Skip to content

Commit

Permalink
Fix uWSGI configuration for clean shutdown
Browse files Browse the repository at this point in the history
As per investigation, we can remove exit-on-reload and use the array form of
the command to ensure proper signal handling on reloads.
  • Loading branch information
amCap1712 authored and mwiencek committed Jan 24, 2024
1 parent c632ecf commit a47c5bf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docker/prod/consul-template-redirect.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ template {
}

exec {
command = "chpst -u art:art /home/art/.local/bin/uwsgi /etc/uwsgi/uwsgi.ini"
command = ["chpst", "-u", "art:art", "/home/art/.local/bin/uwsgi", "/etc/uwsgi/uwsgi.ini"]
splay = "10s"
reload_signal = "SIGHUP"
kill_signal = "SIGTERM"
Expand Down
3 changes: 3 additions & 0 deletions docker/prod/uwsgi.ini
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@ processes = 10
die-on-term = true
worker-reload-mercy = 10
reload-mercy = 25
log-x-forwarded-for=true
; quit uwsgi if the python app fails to load
need-app = true

0 comments on commit a47c5bf

Please sign in to comment.