Flask app get "IOError: [Errno 32] Broken pipe" Flask app get "IOError: [Errno 32] Broken pipe" flask flask

Flask app get "IOError: [Errno 32] Broken pipe"


The built-in werkzeug server is not capable of handling the remote end closing the connection while the server is still churing its content out.

instead of app.run(debug=True,port=5000)

try

from gevent.wsgi import WSGIServerhttp_server = WSGIServer(('', 5000), app)http_server.serve_forever()

or if you are using nginx, use it with uwsgi as described here

It is rather a werkzeug issue I would argue