I hosted my first app on streamlit share a few days ago and when I open it today I find this error.
Argh.
This app has gone over its resource limits. Common causes for this are memory leaks in the app logic, using caching without a TTL, or leaving large datasets in memory even after they are no longer needed. Please update and reboot this app to try again.
Is there any way to solve this error other than rebooting it from time to time.
What kind of app/processing are you building? If possible, can we have a link to you Streamlit Share app / code source, that would help us go to the root cause of the problem?
So I went to check the source code, and you are indeed putting a lot of things into cache
Can you try using a max_entries or TTL to limit the number of elements saved in the long term for functions where you think caching may be less necessary? We’re looking into writing up some more recommendations for this:
Hi! Thanks a lot for extending the invitation yesterday. I have made an image captioning app. I am downloading some weights (only during the boot up) and caching them. (Although, i am doing conditional check, I have still cached the function). This could be the reason.
UPDATE:
I remove st.cache() from download_data() function and trying again. For now, it’s working. I am also using global variables for my models (Encoder and decoder) which would i would like to avoid since they don’t allow me to cache the load_model() function.
But I think my app does not have expensive computations…
UPDATE 2:
My app went over resource limits again after removing st.cache(). I think I am performing four beam searches with beam indices - 3,4,5,6 which is computationally intensive one after another. But it worked fine for a day.
I don’t know about memory leaks other than dangling pointers in C!
Thanks for stopping by! We use cookies to help us understand how you interact with our website.
By clicking “Accept all”, you consent to our use of cookies. For more information, please see our privacy policy.
Cookie settings
Strictly necessary cookies
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
Performance cookies
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
Functional cookies
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
Targeting cookies
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.