Intermittent: Oh no. Error running app

Hello! I have an app deployed here:

But it keeps launching, surviving for a few hours, and then failing. This morning it’s been off more than on.

Do I need to optimize my app, host somewhere else, or is it possible to raise the limit?

Community Cloud does have a limit of 1GB of memory, and it’s possible that your app simply needs more than that.

You might start by looking for memory leaks, following this 3 steps to fix app memory leaks

If you determine you do need more memory, you can see guides here for some different deployment options: Deploy Streamlit apps - Streamlit Docs

Since Community Cloud is focused on running open source community apps for free, there is not a way at this time to get more resources for your app. Sorry if that means you will need to host elsewhere.

I don’t know about the details of your app, but you might be able to make some changes to make it fit well within the 1GB of memory.

Thanks @blackary ! I reran my app while tracking memory a couple of times and also interacted with the frontend to change the graphs around. The memory usage looks to plateau (although it may be on the higher end). I’m wondering if having lots of people checking the dashboard might also contribute. We’re currently fundraising for Open Source Software devs and have raised $1.4M this week ($55M in total over the last few years). Our funding round lasts two weeks and it’s always a busy time. Just need to make it through this busy period and any help is appreciated!

1 Like

Congrats on the fundraising!

One specific suggestion that might make a big difference is how to cache your data – since you are caching decently large dataframes, if you use st.cache_data, every user will get their own copy, and quickly run you out of memory. If you use st.cache_resource, every user will access the same shared object. I tend to use st.cache_resource for data that should be shared across users.

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.

I know this thread is a little older, but Streamlit version 1.32.0 is now out and includes a significant fix for a memory leak. :heart: