Closed vooon closed 2 months ago
If you want to limit the Python concurrency in terms of threads, you should use --blocking-threads 1
in place of --threads
(the latter regards Rust threads, not Python ones).
Mind using this in WSGI will produce huge performance drops, as Granian will process 1 request at time per worker.
In general, there's nothing Granian can do to fix the issue you reported, as it's 100% dependant on the application implementation. Also, Granian in WSGI kinda replaces gevent/eventlet, as threads and concurrency is handled by Granian itself, so there are no plans to natively support this.
Nova (and Neutron) uses eventlet in many places, not only in API. I'll try --blocking-threads=1
, but probably just leave built-in eventlet server.
Anyway, it's a great job!
FYI I run most of OpenStack API services under Granian, but cannot run
nova-api
:Command:
WSGI file (i kept lock like in original pbr's one):
Similar config works with uWSGI, important to have threads=1 not having same problem with eventlet. Unfortunately Nova is too heavy, i don't expect it'll be rewritten to use present async...