Cancel auto-refresh app in the cloud

Hi all,

I launched an app recently through Streamlit Cloud.
Everything looked OK at first sight, but recently, visitors from the app warned me about an automatic page refresh, triggered after several minutes of inactivity on the URL.
Did this happen to anyone?
Is there a way to block this auto-refresh (I have not seen anything in the app settings) ?

Thank you very much

I’m seeing a similar issue. For mine, the deployed app fully auto-refreshes when the user is interacting with input widgets. The goal of my app is to allow users to vary a large number of input parameters and run a simulation, but the users are not able to enter all the parameters before the page refreshes itself. I don’t see the issue when I run locally on my machine – it seems to be an artifact of the streamlit cloud deployment. I too would like to block the auto-refresh, if it is possible. Could this be a deployment container issue?

Same here. Sometimes I get kicked out right away, sometimes after a few minutes… the logs look like it’s updating the code from GitHub every so often even if there are no changes.

I put up a post about this yesterday. So far no solutions:

Hmm… I tried wrapping my streamlit app in a local docker container to see if I could host it myself. In my case, it doesn’t seem like it would reach out to Github. But even when I run the local docker container, I am seeing the same issue as on the streamlit cloud with the page refreshing. In my case, when I try interacting too quickly with any of the numeric inputs (e.g., rapidly clicking an increment button), it completely refreshes the page and resets the session state. Could it be an issue with running streamlit from a linux container? I don’t seem to have any issues when I run it locally from my windows or mac machines. But running from a docker container or streamlit cloud both generate the bug.

I have the same problem! I have a lot of widgets in my app and the user often can’t even interact with all of them and press “submit” because the page refreshes at random times and the session state is reset. I have checked for memory leakage / performance issues but that does not seem to be the issue

@tommaso-moro @giddyphysicist Can you both check if you are running Streamlit version >= 1.11? If refresh is triggered by some interactions with widgets, it might be related to a widget loss issue we had in version 1.9 and 1.10.

1 Like

@lukasmasuch , thank you! I had been using version 1.10. Updating to 1.11.1 seems to have fixed it for me (both locally in a docker container and on the newly released cloud version). I’m waiting to get some feedback from the app users, but for now the version update seems to have fixed it. Thanks so much!

1 Like

@lukasmasuch I have updated streamlit to 1.11.1 but the issue persists…

Hi @tommaso-moro @giddyphysicist @Julitocast

Sorry to hear you’ve experienced that issue, and thanks for reporting it :pray:

The issue seemed to be caused by a bug invalidating the anonymous users’ sessions whenever someone disconnected Github from their account.

That bug was fixed today and released, so users should not encounter the issue anymore, yet please let us know if you’re still experiencing it.

Happy Streamlit-ing! :balloon:

Charly

3 Likes

Hello Charly, I am having the same issue. However the app is deployed in google cloud platform.
upon several research I found out that in google cloud, the app need to return a request. so basically my app keep hitting the request timeout.