Oh no. Error running app. Sudden change in app performance without changing code

Streamlit – app link

The app works as a file analysis tool. I can upload files and it will run data analysis and then I can download a created excel file. The app has been running since April with no issues. Today, it got stuck creating the excel file. I can still upload files, and it shows me some of the written analysis when the program is run, but after that it shows “Conecting…” in the top right corner, and then crashes and reports “Oh no. Error running app.”

I just have “streamlit” in my requirements.txt, so I am running on the latest version of streamlit. I was originally running on python 3.14. I tried running the app on python 3.13, 3.12, and 3.11 as well with no success. I have also cleared the app’s cache and rebooted multiple times. The files uploaded are around 2000-3000KB, well below the 200 MB limit established.

The GitHub repository is private, so I can’t share a link, but the requiremnts.txt shows

streamlit
pandas
openpyxl

Hey there, thanks for sharing your question and all those troubleshooting steps! :blush: It sounds like your Streamlit app is running into resource limits or possibly a memory leak, especially since it gets stuck during Excel file creation and then crashes with the “Oh no. Error running app.” message. This is a common issue on Streamlit Community Cloud, even if your files are well below the upload limit. The error and “Connecting…” status typically indicate your app is exceeding the platform’s memory (2.7GB max), CPU, or storage limits, or possibly hitting a bug in the latest Streamlit version. Rebooting and clearing cache are good first steps, but if the underlying issue persists (like a memory leak or inefficient data handling), the app will crash again after a short time.

To address this, try the following:

  • Use st.cache_data or st.cache_resource to cache expensive computations or data/model loading, so they only run once per session.
  • Profile your app’s memory usage to identify leaks or heavy operations (see resource limits guide and common app problems: resource limits).
  • Move large datasets or intermediate results to a database or external storage if possible.
  • Restrict cache size with ttl or max_entries to avoid unbounded memory growth.
  • If you’re using pandas/openpyxl to generate Excel files, ensure you’re not holding large DataFrames in memory longer than needed.
  • If the problem persists, try simplifying the Excel generation logic or splitting it into smaller steps.
  • For more persistent issues, deleting and redeploying the app sometimes helps clear stuck states.
    If you can, please share a minimum reproducible example (with dummy data) so the community can help debug further. Community members—feel free to jump in with your insights!

Sources:

i had the same problem with the release of 1.59.1. if you pin streamlit==1.59.0, it should be resolved, fixed it for me.

I continued to do some troubleshooting and found that the error was in writing the dataframe. Both st.write and st.dataframe would crash the app. I tried using a smaller dataframe with 2 lines instead of 200 to see if it was a timeout issue, but this crashed the app as well, even when running on 1.59.0.

This might be caused by a bug in pyarrow 25.0.0: [C++][Python] SIGSEGV in bundled mimalloc mi_thread_init when libarrow is first loaded on a non-main thread that exits (mimalloc 3.3.x, pyarrow 25.0.0) · Issue #50471 · apache/arrow · GitHub
Please make sure to update to Streamlit 1.59.2 or pin pyarrow < 25.0.0 to prevent this crash.