Going beyond the resource limit

Hi,

I’ve deployed a web application on streamlit sharing.
https://share.streamlit.io/vikiggg/carpriceestimator-recommender_streamlit/predictor.py
Everytime I reboot my app, it will work for couple times of running. however, if I run again, it will show

This app has gone over its resource limits. Common causes for this are memory leaks in the app logic, using caching without a TTL, or leaving large datasets in memory even after they are no longer needed. Please update and reboot this app to try again.

Is there a way to improve resource limit? Because I am showing my project to audience and just want to keep this app active for long.

Thanks for the help in advance.

Hi @vikiggg -

Your app uses a lot of df.copy() statements, which likely contributes to your memory issues. I would suggest removing all of the copies, and instead reference the data directly.

Best,
Randy

Hi @randyzwitch , I am facing the same issue intermittently. Here is the app: https://share.streamlit.io/learner-subodh/streamlit-sharing/main/detect_emotions.py
Can you please guide me how can I optimize it?