When I run the app for the first time, it is working fine but when I stop the app and try to run it again, then it gives error "Internal server error, server overloaded". It is due to the process running on that port does not get killed when the app is stopped.
I run my Flask app by,
app.run(port=5555)
And I don't want to do app.debug = True Any help on how to kill the process when the app is stopped, without debug = on