I have a Flask application running on a linux server and noticed that occasionally it get stuck when sending POST request to it and then go to GET and try POST again (then it get stuck). It get 'un-stuck' if I do GET again (then last POST that was stuck gets completed).
First part of Flask app is:
@app.route('/myroute', methods=['GET','POST'])
def myfunction():
if request.method == 'POST':
...
else:
...
Starting it with:
FLASK_APP=myflask.py FLASK_DEBUG=1 python -m flask run --port 8300 --host=0.0.0.0 --no-reload.
Also did setup parallel threads with:
if __name__ == '__main__':
app.run(threaded=True)
but that did not prevent for getting stuck.