Getting error:[manager] Error checking Streamlit healthz: Get "http://localhost:8501/healthz":

Hello, I successfully deployed my app in streamlit
But when I try to run it more than 3 time, It crashes.

The log says
[manager] Error checking Streamlit healthz: Get "http://localhost:8501/healthz": dial tcp 127.0.0.1:8501: connect: connection refused [manager] Streamlit server consistently failed status checks

I understand the error is because of resource allocation,
but I am using st.cache here, so the file won’t be downloaded again

@st.cache
def download1(url1):
    url = url1
    filename = url.split('/')[-1]
    urllib.request.urlretrieve(url, filename)

download1(“https://github.com/Anubhav1107/streamlit/releases/download/fasterrcnn.pth/fasterrcnn.pth”)
The app is in
https://share.streamlit.io/anubhav1107/streamlit/streamlit.py

Thanks

1 Like