streamlit / streamlit

Streamlit — A faster way to build and share data apps.
https://streamlit.io
Apache License 2.0
35.64k stars 3.09k forks source link

Streamlit app autorefresh or autoreload #9503

Open RajanGoyal1002 opened 1 month ago

RajanGoyal1002 commented 1 month ago

Checklist

Summary

The streamlit app working perfectly locally. But when I deploy it on AWS EC2. The app reload or refresh automatically after few minutes. As a result, all progress has been lost. I am using streamlit version 1.38. The same issue has also been reported in previous version but no solution has been provided.

Reproducible Code Example

No response

Steps To Reproduce

No response

Expected Behavior

No response

Current Behavior

No response

Is this a regression?

Debug info

Additional Information

No response

github-actions[bot] commented 1 month ago

If this issue affects you, please react with a 👍 (thumbs up emoji) to the initial post.

Your feedback helps us prioritize which bugs to investigate and address first.

Visits

RajanGoyal1002 commented 1 month ago

@aleroldan156 The link you have sent belongs to dangerous file. I am attaching screenshot. ![Uploading Screenshot_2024-09-19-17-05-49-76_40deb401b9ffe8e1df2f1cc5ba480b12.jpg…]()

sfc-gh-nbellante commented 1 month ago

Hi @RajanGoyal1002 thanks for filing this issue. If you could share a minimum viable repro of the issue, that would be very helpful in figuring out what's going on here

RajanGoyal1002 commented 1 month ago

I don't have any repo. But I can share the video and community link where this problem has been discussed since last two years but it is still unresolved. This is video of my app

https://github.com/user-attachments/assets/d9d47e2f-2576-452a-a873-1d32637e51fa

This is community link where this problem has been discussed since last two years and is still not resolved. https://discuss.streamlit.io/t/cancel-auto-refresh-app-in-the-cloud/28348

sfc-gh-nbellante commented 1 month ago

I've surfaced this issue to the related team. Thanks for your patience.

sfc-gh-nbellante commented 1 month ago

It would also be very helpful if you could provide us with whatever logs you're seeing serverside via using --logger.level DEBUG

sfc-gh-nbellante commented 1 month ago

A couple more ideas: 1) in 1.39.0 there will be a way to configure what the TTL is for disconnected sessions. Perhaps modifying that could help. 2) being able to analyze the performance metrics of your server would be very helpful. (Either from the aws console or with a fragment with rerun every 5 seconds and writing the memory consumption to the streamlit app.)

By doing these, it will help us narrow down why the issue is occurring and better inform how to fix it.

RajanGoyal1002 commented 1 month ago

It would also be very helpful if you could provide us with whatever logs you're seeing serverside via using --logger.level DEBUG

I am attaching the log file. streamlit_logs.txt

marcvaneck commented 1 month ago

Hi, to add to this conversation, I'm seeing the same on a Google Cloud Run setup. It has been the case since publication, and has been consistent across versions (also now on latest version). It is in line with this discussion: https://discuss.streamlit.io/t/cancel-auto-refresh-app-in-the-cloud/28348/50. I currently use session state to keep things in check as also mentioned by others in this conversation, but would be great if a solution would be possible for cloud solutions like Cloud Run or AWS EC2.

RajanGoyal1002 commented 1 month ago

@sfc-gh-nbellante Hello is there any update on this issue.

RajanGoyal1002 commented 2 weeks ago

This issue has been discussed on many platforms. Many new versions has been released but this issue has not been resolved. I have raised this issue here also. But till now I am not able find a concrete solution to this. In my point of view, streamlit is useless if this issue is not resolved.