It works well most of the time, but it occasionally crashes - maybe once every couple of weeks. While I’d like to make the app more stable, I’m not sure how to debug this.
My question is: Is there a way to write a monitor for streamlit apps? For example, if I access the app URL with an automated GET request, is it possible to tell from the response if the app is running? I can live with the occasional crashes, but I’d love to get alerted when it needs re-started, or even better, have the app re-start automatically after a crash.
I’d appreciate any hints or tricks. Thanks for considering!
Yes, of course.
There would be quite a few different possibilities.
There are hosted health check services.
You could host a health checker yourself.
You could program a health checker yourself.
If yes, on which platform and in which programming language?
Well - I’m open to any suggestions you have for health checker’s. I don’t have much experience with these.
I am working on a linux machine, and I don’t mind writing my own monitor. I’m most comfortable working in python, but I could use bash or some other language if needed. There are also members of my team who use nagios monitors. I could try to plug-in to that infrastructure, though I’d have to get myself up the learning curve.
In any of these scenarios, I think I’d need to know what to look for in an HTTP response to tell if the app is running (right?).
So if you already have a running monitoring solution in your organisation, I would definitely use that and not reinvent the wheel. With Nagios, that’s definitely possible, but I’m not familiar with it, so you’ll have to ask your colleagues.
Thanks for stopping by! We use cookies to help us understand how you interact with our website.
By clicking “Accept all”, you consent to our use of cookies. For more information, please see our privacy policy.
Cookie settings
Strictly necessary cookies
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
Performance cookies
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
Functional cookies
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
Targeting cookies
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.