0

I am running a Flask-Python script from eclipse. When i run a script it's running with the development server url : http://127.0.0.1:5000/. When i click Terminate or Terminate All (Ctrl + Alt + F9) from eclipse, it's terminate/stop the process. But, If i access the url : http://127.0.0.1:5000/ from browser, i can access this url. How do i stop this permanently.

Like, if we are using ASP .Net projects, we can access the url after stopped debugging from visual studio. Completely stop debugging for ASP .Net projects, need to stop the local ASP .Net Developement Server. How do i achieve like this in eclipse.

Note : I checked this scenario with Django projects from eclipse. But i'm facing the same issue.

Thanks in advance !!!

davidism
  • 121,510
  • 29
  • 395
  • 339
Manikandan Sethuraju
  • 2,873
  • 10
  • 29
  • 48

2 Answers2

0

The usual issue is that you have a main script which executes a secondary process to do the work (for auto-reload).

I haven't checked this, but the usual 'easy-fix' is passing in the command line an option which says that you don't want the reload to happen (in which case it wouldn't create a second process).

Fabio Zadrozny
  • 24,814
  • 4
  • 66
  • 78
0

I was facing same problem, so i created thread.

Eventually i found solution after reading this thread.

Trick is while running your application pass use_reloader=False.

app.run("0.0.0.0", 5051, debug=True, use_reloader=False)
Community
  • 1
  • 1
Harikesh
  • 313
  • 3
  • 14