I am running a streamlit app (version 1.11.1) on AWS EC2 ubuntu server. In the app, users upload a csv file and visualize the data. Users frequently change different csv files (e.g., 100 per day) from different dataset to do check the visualization. After the app runs for a few days, I got the following error and I have to reboot the app to get back to normal. After googling the web and some solutions suggest to change the ulimit to a larger number for a temporary solution.
I think there maybe a solution by closing the files in the st.file_uploader function. That is, it should also close the file (descriptor) at some point (this page Where does st.file_uploader store uploaded files and when do they get deleted? - Streamlit Docs indicates it will delete the file from RAM, but not sure if it close the file). Or it is already there and I just did not notice? Any thoughts? Thanks a lot.