質問

I'm currently creating an image upload system using Python and Flask running on Amazon Elastic Beanstalk.

Everything works fine, but the problem is that the upload blocks the entire web server, including incoming page load requests.

How do I make the file upload run as a separate process? Or allow additional incoming requests? Will this happen automatically if I increase the number of processes available in EC2?

役に立ちましたか?

解決

I'm putting this as an answer.

You can set the threaded parameter in the main function in Flask like this:

if __name__ == '__main__':
    app.run(threaded=True)
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top