3

We already have a restful flask application uses tornado as the wsgi container installed and ran as a windows service in the production environment. Recently customer reported a timeout issue as they ran batch processing by calling this API. Have a bit of search for enabling multiprocessing in tornado but seems like it is only the option in Linux system but not the windows. Will it doable to make this flask application to be multiprocessing in that situation?

edited - I can't install WSGI server like Gunicorn or uWSGI in the server box which is windows based. Just to clarify again my question is talking about how to make a flask application multiprocessing run as a windwos service. We use Tonado as the WSGI container for now but it can be replacable as long as it can support multiprocessing in windows

Kuku
  • 484
  • 8
  • 28
  • I'm not asking how to set up flask with tornado, I'm asking how to make flask app to be multiprocessing in a windows server box. – Kuku Jul 01 '19 at 22:18
  • Have you considered load balancing multiple tornado using Nginx or Apache. – elsadek Mar 24 '22 at 07:53
  • Hello, I also encountered the same scenario, that is, a web service that supports multi-process on Windows. It seems that both flask and tornado can start only one process. I would like to ask how you solved this problem? – jiligulu Sep 13 '22 at 09:13
  • @jiligulu I recreated the whole logic in java instead then. For the python flask what you can try is to start up multiple instances and run behind the load balancer. – Kuku Sep 14 '22 at 08:05

0 Answers0