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 committed Nov 28, 2023
1 parent 3d19c40 commit 3c8ae89
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
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
2 changes: 0 additions & 2 deletions docker/prod/uwsgi.ini
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,3 @@ reload-mercy = 25
log-x-forwarded-for=true
; quit uwsgi if the python app fails to load
need-app = true
; when uwsgi gets a sighup, quit completely and let runit restart us
exit-on-reload = true

0 comments on commit 3c8ae89

Please sign in to comment.