This is a toy WSGI app under Gunicorn and uWSGI, used to explore forking behaviours interacting with Open Telemetry (and BatchSpanProcessor
in particular).
gunicorn wsgi:app --workers 3
Optionally plus --preload
, so that gunicorn will import Python into the main process before forking the workers.
uwsgi --http :8000 --master --workers 3 --import uwsgi-tasks.py --module wsgi:app
Optionally plus --lazy-apps
, so that uWSGI will delay importing Python until after the workers have been forked.
Note: the default loading of Python under gunicorn and uWSGI are inverted relative to each other.