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

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

The app is in


Hi @Anubhav1107 -

In looking at your app, unfortunately I think this has to do with using Torch. As far as I can tell, your app doesn’t have any obvious flaws, but Torch is such a big dependency that running your app a few times then exhausts all available RAM, which causes the error you are seeing.

I’ll forward this thread on to our product and cloud teams, so they can have another example and possibly find a solution for this.


OK, thanks so much for looking @randyzwitch