-1

I'm running a Python application which uses flask and apache. When a second person uses the app it waits till the first process ends making everything pretty slow. It's supossed to run with atleast 20 users simultaneosly. What should I do? (sorry for my bad eng)

2 Answers2

4

Using the simple app.run() from within Flask creates a single synchronous server on a single thread capable of serving only one client at a time.

app.run(threaded=True)

threaded=True will process each request in a separate thread.

Karthikeyan KR
  • 1,134
  • 1
  • 17
  • 38
1

apache should take care of that for you. see http://flask.pocoo.org/docs/0.12/deploying/mod_wsgi/ for details on how to implement this for a flask app.

teknoboy
  • 175
  • 1
  • 2
  • 12