Memory management in Streamlit dashboards

I want to understand better how the Streamlit app does manage memory issues.

I run my app on a VPS server which has a couple of Gigs of RAM and the app loads some data from a database. Let’s say, the data loaded is 100MB. Does every user of my app uses 100MB of my RAM in such case? If so, I would have very limitied possible number of users at the same time.

I don’t use any special cloud tools, containers, kubernetes, or anything like that. Just running the app on the localhost of my server. Is it the proper way of using Streamlit dashboards?

@patpal Thank u for bringing this up to the forum. You will find ur answer in:

If u want to limit users u can do it in code, by implementing a rate limiter and check if the rate exceeds when in the beginning of

if rate > 20:
st.error(“max users exceeded”)

For counting the number of users, I suggest using queue, python’s Counter (Thread safe counters).

TLDR:Maximum number of concurrent users for streamlit app - #2 by randyzwitch