I read similar posts with this error.
So can anyone check if my app is crashing due to memory usage or resource limitations or is it something else?
https://ftanveer-movie-tv-show-recommender-main-o08uvf.streamlit.app/
There isn’t any big files in github repo, but the code does generate a cosine similarity matrix shape of 14,210 x 14,210.
Any help is appreciated.
Hey @ftanveer,
Here’s a graph of your app’s memory usage over the past week. It does look like the memory usage has been spiking, which likely caused those error messages/crashes.
Thanks a lot Caroline, the webapp is now able to run. I reduced the main database to reduce the load.So the cosine similarity matrix is now 5000 x 5000. I would have liked to run the 14,210 x 14,210 for better movie recommendations but it is okay.
Hey @ftanveer
You could also not reduce the main database, and instead use caching when loading your models so that they are loaded into memory just once:
Thanks for the suggestion. I used the cache like below and it already helped alot, but not sure if I could optimize my code further or I am not properly caching my matrix.
My code is here:
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.