Skip to content

Worker restart #1246

Answered by ewjoachim
spapas asked this question in Q&A
Nov 28, 2024 · 1 comments · 5 replies
Discussion options

You must be logged in to vote

SIGHUP in Gunicorn may reload the config but only reloads the python modules in certain cases (when preload_app is not active). This is because the main process in Gunicorn (to my knowledge) is not the one that answers requests. Upon SIGHUP, it may stop the worker process(es) and start a new one.

Procrastinate (currently) runs everything in its own process, so if we want to restart, we can't stop a subprocess and start a new one: there's no subprocess to restart.

Reloading a Python module in place may be a bit complex, especially around the fact that old objects continue existing while new ones are added. In other works, if you use importlib.reload on a module that has a class following t…

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@spapas
Comment options

@ewjoachim
Comment options

Answer selected by spapas
@spapas
Comment options

@ewjoachim
Comment options

@ewjoachim
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants