Not able to launch streamlit app using the url

Dear friends,

Off late, I’m experiencing a weird phenomenon in that I can’t launch my Streamlit app as before by running the generated url on my browser without restarting my computer. I get the url generated by running the command ‘streamlit run app.py’ but when I copy and run the url in the browser it wont launch. The url is not the problem per se as it is just as it was before: http://my_public_IP_address:8501.

However, if I restart my computer and freshly generate the url it launches the very first time and then quit working afterwards. Has anyone experienced this before? I’m new to programming so not sure what is happening with the IP address and the port and I doubt if this issue stems from Streamlit itself.

Kindly shed some light into the issue if you can figure out what could be causing it.

Hi @pyuser,

Thanks for the question. That indeed sounds like a strange issue that may not be related to Streamlit directly.

Can you tell us what OS you’re running Streamlit on?

I’m guessing your machine either isn’t fully shutting down some Python processes, or it isn’t giving back the ports Streamlit was claiming. Problem-solving is going to hinge on which OS you’re on. Let us know and we’ll try to help!

Thanks for the response. You are right. When I switched the port to custom ones like 8503 it worked. I’m using Win10 btw.

I’ve a question though can we make sure when we terminate Streamlit session the port it is launched from also gets freed up? I ask this because everytime I use a port and terminate the app session that port is unavailable until and unless I restart the computer.