Issues with stopping the server on localhost
See original GitHub issueHi, thank you for making this cool project!
I’m having issues with actually stopping the server on localhost. Pressing CTRL+C does not seem to actually stop it, at least not immediately. This confused me when I did something like try to run a different file only to have it appear the exact same, or close all instances/terminals that had been running Dash, go to 127.0.0.1:8050 and still see the page happily running. It doesn’t seem to matter if I’m on Firefox or Chrome. This is using Git Bash on a Windows 7.
While this was going, I looked at my Task Manager and saw some stray python.exe’s running even after I had completely closed the terminal. Force closing them through the Task Manager solved the problem. Sometimes they would dissipate on their own after a minute or so; not sure exactly the difference between when it stopped on its own or kept going.
I’m not sure what’d be going on other than maybe a garbage collection issue, but it made for an interesting “Am I crazy what’s going on???” session.
My code is more or less following the Dash tutorials:
import dash
from dash.dependencies import Input, Output
import dash_core_components as dcc
import dash_html_components as html
app = dash.Dash()
x = [1,2,3,4,5,6]
y = [7,4,2,1,2,4]
app.layout = html.Div(children = [
html.H1('Hello World'),
html.Div('First go at making a framework.'),
html.H2('A Toy Data Graph'),
# a simple graph
dcc.Graph(
id = 'toy-graph',
figure = {
'data': [
{'x': x, 'y': y, 'name': 'numbers!'}
],
'layout': {
'title': 'Random numbers!'
}
}
),
])
if __name__ == '__main__':
app.run_server(debug=True)
Issue Analytics
- State:
- Created 6 years ago
- Comments:19 (4 by maintainers)

Top Related StackOverflow Question
Hey @Yuminzhou Sorry, I dropped off the face of the planet a bit. 😃
I don’t know if you are still having this problem, but for any newcomers on the thread, the fix for me was to turn debugging OFF
app.run_server(debug=False)That solved the issue for me. I got that from reading the Flash issue @chriddyp referred to.
I am using a mac i just used the activity monitor search for python and killed it. Then started my other Dash application and it worked fined. It’s not the best method but it saved me time when i had to focus on my project work.