Local Data Disappeared

I recently created a streamlit app and deployed it here i.e. community cloud.
One of the features were that people can acknowledge and show themselves on the PCA graph and see others too.
This was done by saving their records on a local file.
Today, I only see the 2 records on the graph that were in my github repo at the time of deployment.
Others simply disappeared.
How?

Does streamlit refreshes the app every few hours to the repo verion?
And if so, do I need to make a commit, push for every new record in the local file?

debugging Community Cloud Using Streamlit streamlit-cloud

Local files may be deleted at any time. Only the files from your GitHub repository are guaranteed. Any time your app reboots, the local files start from a fresh clone of your repository. This may happen if there is a system update, migration, or incident (or if you change an app setting, update something in your repo, or manually trigger a reboot).

So every time I make any streamlit app, I have to make sure that I either push the new incoming records to github or use a SQL server or some other online Data base.

Basically, yes. If your app is doing some read/write operation that you want to persist for more than a session, that data should be hosted and served somewhere, like a database. (Or if you do a custom hosting solution where you control the hard disk of your app, you can do whatever. :slight_smile: )

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.