Multiprocess in python Flask-Gunicorn

I'm new in multiprocessing module and i have a question about it.

I use Gunicorn as wsgi to run my flask application. I understand that gunicorn use workers (based on cpu cores) to handle request in parallel way. But I have a heavy process in my flask app, i wanted use multiprocess module to improve response time , however every time i call :

multiprocessing.Process(target=func, args=[arg1..])

gunicorn restart a worker and makes response time longer.

There any problem using multiprocessing module inside a flask app running in gunicorn ?

Thanks



Read more here: https://stackoverflow.com/questions/66996485/multiprocess-in-python-flask-gunicorn

Content Attribution

This content was originally published by sebas0205 at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: