Conversation
f49dba0 to
4dbb061
Compare
Contributor
Author
|
Tested on the production server and everything seems reasonable |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR replaces the embedded gunicorn instance with waitress https://docs.pylonsproject.org/projects/waitress/en/latest/#
Gunicorn was not particularly set up to be run in this way. It's largely meant to be used from the command line rather than embedded in application. Its
forking model just didn't well in qcfractal and it conflicted with other multiprocessing stuff. Also, logging was a pain.So let's try waitress instead. It is much simpler, and much more amenable to embedding in a python application.
I hope this also fixes the spurious
502 Bad Gatewayerrors, although I wouldn't be surprised if it doesn't.Waitress only works with one process, so the
num_workersparameter in the config is no longer used.Also as part of this PR, logging will work through a queue. This will help in the multi-process environment, and allow for using TimedRotatingFileHandler and handlers from python.
Lastly, this also quiets some logging when doing admin stuff from the CLI (like modifying users). It enables using
-vand-vvto increase verbosity
Changelog description
Replace gunicorn with waitress and fix logging issues
Allow increasing verbosity on the CLI with
-vand-vvon the cliStatus