This is a fork of gunicorn with the following changes:
- Request timeout implementation for gthread - #1 (upstream doesn't have any, we NEED this.)
- Higher timeout for selector - #2 (This is a small optional performance improvement)
Note to anyone upgrading/adding changes: - Pull upstream changes - Reapply our changes or reconcile our changes - Update commit/ref in frappe/frappe pyproject.toml - Keep this readme up-to-date with changes. Keep changes small and to the point.
TODO:
- [ ] Plan a cleaner solution using custom workers. All current changes can be used with custom workers but they have the same awkwardness of maintaining a fork since we want to "override" not extend core behavior.
Gunicorn 'Green Unicorn' is a Python WSGI HTTP Server for UNIX. It's a pre-fork worker model ported from Ruby's Unicorn project. The Gunicorn server is broadly compatible with various web frameworks, simply implemented, light on server resource usage, and fairly speedy.
Feel free to join us in #gunicorn on Libera.chat.
The documentation is hosted at https://docs.gunicorn.org.
Gunicorn requires Python 3.x >= 3.7.
Install from PyPI:
$ pip install gunicorn
Basic usage:
$ gunicorn [OPTIONS] APP_MODULE
Where APP_MODULE
is of the pattern $(MODULE_NAME):$(VARIABLE_NAME)
. The
module name can be a full dotted path. The variable name refers to a WSGI
callable that should be found in the specified module.
Example with test app:
$ cd examples $ gunicorn --workers=2 test:app
See our complete contributor's guide for more details.
Gunicorn is released under the MIT License. See the LICENSE file for more details.