The service has encountered an error / Streamlit server consistently failed status checks

The deployment is always successful, I get to use the app normally every day, but every morning on the next day I find the error messages and need to reboot the app, which fixes the issue for the whole day until I find the error again on the following day.
The last error message suggests I should know what the error is, but I don’t. Can I run the error checks myself and find out what the error is?

What I get in the ‘Manage app’ logs:

[05:06:19] The service has encountered an error while checking the health of the Streamlit app: Get “http://localhost:8501/script-health-check”: EOF
[05:07:52] Streamlit server consistently failed status checks
[05:07:52] Please fix the errors, push an update to the git repo, or reboot the app.

Hey @victorccaldas,

Can you share a link to the deployed app and the GitHub repo?

Hey @Caroline, the project is private since it contains sensitive data. Would it be possible to instruct me on performing a health check? If that’s not an option, sure I could temporarily share the access privately with you. Does that work?

This sounds like it might be a resource issue (apps are limited to 1GB) – if you can share the app link I can check the resource usage (I don’t need view access to the app to do so)

Oh sure! Here it is

Hey @victorccaldas,

Here’s a graph of your app’s resource usage:

The limit for apps on Community Cloud is 1 GB, so it seems pretty likely that the resource limit is the cause of the error you’re seeing. Check out our blog post on reducing your app’s resource usage here.

If your app is used by an educational or nonprofit organization, you can request increased resources here.

Hey @Caroline , thanks for the answer!

I have a few questions about the matter:

  • With a limit of 1GB, how are the chart’s values always above 2GB ?
  • Is it possible to find out the cause of peaks in resource usage that lead to crashing? considering they happen in periods of inactivity, since I have never experienced it crashing while using it.

Each app is guaranteed 1 GB of memory, but you usually won’t see a resource-related error until you get closer to 3 GB of memory.

Unfortunately I don’t have visibility into what’s causing the higher resource usage for your app (especially since it’s private), but I’d recommend checking out that blog post I linked above, as well as our docs on caching.

I see. Thanks @Caroline, I will try using psrecord to track memory usage. Do you know if it’s possible to use it on the community cloud? Since the steps mentioned on the post only consider testing out on localhost.

Also, do you find it strange that the memory crashes often happen during the app’s inactive periods? Or is this normal, based on your experience?

It looks like another community member tested it on Community Cloud, so it should be possible.

@Alexandru_Toader thoughts on the second question?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.