When launching our app via streamlit cloud we seem to experience an annoying bug. The site automatically refreshes somewhere between 15-30 minutes. This is a serious problem for us as we are trying to create a platform that is used for collecting data and doing some statistics on the users. (This is only done on voluntary users! We are doing a research project testing out ways to improve learning rates). Now when the page automatically refresh we lose all the states and information of the user(they are anonymous and seperated by a randomly generated id upon launch) and it goes back to square one as if the user just opened the application on their browser.
I can’t seem to find a way to work around this and there seems to have been a lot of people having trouble with this in the past, yet all i can find is some devs saying it was a bug in 1.9 and 1.10 and that it is now solved. I am not entirely sure of what version streamlit cloud launches in or how to check it, but locally we all have streamlit 1.16 .
I have been to a few different drafts trying to find a solution for me and my groups problem
No we do not. However we do not see which version we should specify it to as we have seen many other people reporting the same issue with versions up to 1.20
Hello! I’m experiencing a similar issue too. My Streamlit Cloud App is supposed to process some data from Google Drive and upload them back, showing the progress through a bar. At the end, the app should print overall statistics and upload them as well. What happens is that on average after ~30 minutes, the frontend refreshes automatically (and the bar disappears), while the backend continues to run. At the end, I have the all the files are still correctly processed and uploaded, but the final output summary is not printed, nor uploaded because of this.
if it is any help, we solved the problem by storing all our session states in a data base regularly (obviously overriding old ones to save space), and then we make the program load the stored session upon start up
This has been an issue that I’ve seen come up a lot and I’m still a little fuzzy on the details myself. However, I’ve heard that having a file uploader on the page may exacerbate the issue (or possibly be one of the root causes). So, this is a wild shot in the dark, but…
If you happen to have a page with a file uploader that’s the one resetting on you…can you shuffle the file to session state so that you can go to a different page to perform that long process. My hypothesis is that reducing the complexity of what Streamlit is trying to “keep active” (widgets) while performing the longer process may help.
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.