Don’t you running the flask app with uWSGI’s “preforking worker mode” that is a basic config?
Try lazy-apps mode that each worker will load the trained model for them self and not share with others.
It works in my environment even I load model in the global.
command
uwsgi --lazy-app 
or ini file
[uwsgi]
lazy-apps = true

minimum reproduction

  
      
      GitHub
  
  
    

keng000/uwsgi-flask-ml 21

Contribute to keng000/uwsgi-flask-ml development by creating an account on GitHub.