Search code examples
eclipseflaskaptanapydevaptana3

Terminating Flask's Internal Server in Eclipse ( Aptana Pydev)


I am using Aptana plugin in eclipse Luna. Pydev is already there in Aptana.

I am doing flask development using flask's internal web server (Werkzeug/0.10.1 Python/2.7.6).

When i run my project everything goes well but when i terminate run, my app server remain active.

It keeps serving and when i run my project again it gives me following socket error.

socket.error: [Errno 98] Address already in use

Previously i was using pydev without aptana and it was working fine. Now for every run i am killing process manually which is very annoying.

I am using ubuntu and virtualenv.

How can i overcome this issue ?

Thanks


Solution

  • 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)