Skip to content

Latest commit

 

History

History
47 lines (29 loc) · 2.46 KB

oh-no-error-running-app.md

File metadata and controls

47 lines (29 loc) · 2.46 KB
title slug
Oh no. Error running app
/knowledge-base/using-streamlit/oh-no-error-running-app

Oh no. Error running app

Resource limits

All Streamlit Community Cloud users have access to the same resources and are subject to the same limits (1 GB of RAM).

If your app exceeds its resource limits, developers and viewers alike will see '😦 Oh no.'

App state: Oh no. Error running your app.

Checking for errors

If you see the '😦 Oh no.' message when viewing your app, first check your Cloud logs for any specific errors. If there are no errors in your Cloud logs you are likely dealing with a resource issue. In other words, the app may have exceeded its allocated resource limit.

If you are logged into a developer account for an app over its limits, you can access "Manage app" from the lower-right corner of the app to reboot it and clear its memory. "Manage app" will be red and have a warning icon (<i style={{ verticalAlign: "-.25em" }} className={{ class: "material-icons-sharp" }}>error).

Developer view: Oh no. Error running your app.

Optimizing the app

There are a few things you can change in your app to make it less resource-hungry:

  • Reboot your app (temporary fix)
  • Use st.cache_data or st.cache_resource to load models or data only once
  • Restrict the cache size with ttl or max_entries
  • Move big datasets to a database
  • Profile your app's memory usage

Solution

To address this issue, we highly recommend going through and implementing the suggestions in the following blog posts to prevent your app from hitting the resource limits and to detect if your Streamlit app leaks memory:

The following blogs also provide userful tips for improving loading speed and performance: