A note on Python threads
If you start uWSGI without threads, the Python GIL will not be enabled, so threads generated by your application will never run. You may not like that choice, but remember that uWSGI is a language-independent server, so most of its choices are for maintaining it “agnostic”. But do not worry, there are basically no choices made by the uWSGI developers that cannot be changed with an option.
If you want to maintain Python threads support without starting multiple threads for your application, just add the --enable-threads option (or enable-threads = true in ini style).
Ex:
[uwsgi] # ------------- # Settings: # key = value # Comments >> # # ------------- strict uid = root gid = root # socket = [addr:port] http-socket = 0.0.0.0:9034 wsgi-file = app.py callable = TEST_SERVICE # master = [master process (true of false)] master = true # processes = [number of processes] processes = 5 py-autoreload = 0 buffer-size = 32768 need-app = true attach-daemon = celery -A app.CELERY worker --loglevel=INFO --concurrency=1
Above properties detail information available below url:
Reference:
https://uwsgi-docs.readthedocs.io/en/latest/WSGIquickstart.html