I have constructed some apps using Streamlit, and until now it was all perfect.
Right now, I am facing a problem with all the apps that are deployed through Streamlit Cloud.
The problem is that every app that I have created now automatically refreshes to the initial configuration, even if I am interacting with some widgets. This has caused a lot of trouble with the user experience of my apps. Even with the ones that previously worked without a problem.
It is not a matter of the browser compatibility, because I have tried using different browsers, and the problem repeats itself.
I don’t know it the problem is related to the memory of the app, or if there is any timing functionality behind that is causing it to constantly refresh.
I would appreciate if anyone could give me an insight into how to solve this issue.
Hey @postdatacrc,
Thanks for reporting this issue! Your issue might be related to a race condition we had with Streamlit version 1.9 & 1.10 that sometimes leads to the widget state being dropped. We fixed it in 1.11 (see this PR). Is your app running with Streamlit 1.11?
I also have the same issue with my app refreshing even though I have version 1.11 installed.
The only issue is it refreshing nothing else. If you could help that would be greatly appreciated, thank you.
@MrOmega This seems to be a new issue since this is unexpected to happen in 1.11. It would be great if you could open a new issue on Github and add some information (video of the issue, code snippet to reproduce).
Guys where is your app deployed?? I am having also the same issue. It keeps refreshing every 5mins (which is the default request timeout of my server) it is deployed in google cloud run.
upon several research, I found out that in google cloud docs, an app need to return a request. Which is I don’t know how to do it yet.
Same issue here. I dont see this behavior when running locally, but on Steamlit Cloud it refreshes every few minutes, breaking the user’s session and resetting everything.
Is there anyway we can save session settings locally (to a text file maybe), so even though the app refreshes, it can reload from the saved file & we can set the user session again, without having to worry about the app refresh??
I found the solution for google cloud deployed apps. Not for streamlit cloud, sorry.
FOR GOOGLE CLOUD:
In your app control panel, there is a menu with metrics,details, and YAML
YAML (short for “YAML Ain’t Markup Language”) is a human-readable data serialization format. It is often used for configuration files and can be more readable and less verbose than other formats such as JSON and XML.
In Google Cloud Run, you can use YAML files to define and configure Cloud Run services. These YAML files, called cloudbuild.yaml, are used by the Google Cloud Build service to build and deploy containers to Cloud Run.
find the timeoutSeconds spec, that should be set to 300 by default.
Enter Edit mode for this file
Change timeoutSeconds to 3000, for example. 3600 is the max allowed
Then you are asked to change also the name of the template:
spec:template:metadata:name
in my case was energyanalyzer-00014-qel and changed to energyanalyzer-00015-qel
Save and implement again. This solves the issue.
I guess streamlit guys should change this value, as far as I know we cannot configure this param by ourselves.
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.