Score:0

gunicorn, systemd, and WINCH not playing well together

us flag

Based on the docs you can spin up a "new" gunicorn with kill -USR2

Then you can send a kill -WINCH to the old master process to kill off it's workers.

But if Systemd launches gunicorn (like this)

ExecReload=/bin/kill -HUP $MAINPID
ExecStart=/app/next/bin/gunicorn --pid /var/run/next/gunicorn.pid --chdir /app/next/dubclub --workers 5 --bind unix:/var/run/next/next.socket myapp.wsgi:application
ExecStop=/bin/kill -TERM $MAINPID

all that happens on WINCH is [INFO] Handling signal: winch

Docs also say you have to use --daemon on the command line to daemonize it. BUT if you do that with systemd, gunicorn exits right after starting.

Is there a way to use --daemon with systemd and still leave the process running?

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.