Flask - socket.error: [Errno 10053] An established connection was aborted by the software in your host machine [duplicate] Flask - socket.error: [Errno 10053] An established connection was aborted by the software in your host machine [duplicate] flask flask

Flask - socket.error: [Errno 10053] An established connection was aborted by the software in your host machine [duplicate]


This is an issue with the Python 2 implementation of the SocketServer module, it is not present in Python 3 (where the server keeps on serving).

Your have 3 options:

  • Don't use the built-in server for production systems (it is a development server after all). Use a proper WSGI server like gunicorn or uWSGI,
  • Enable threaded mode with app.run(threaded=True); the thread dies but a new one is created for future requests,
  • Upgrade to Python 3.