Last night 2023-01-17 around 11:20ish CT both my cloud and local instances running the same python script stopped working, they would just spin in a RUNNING state. Both had been working fine for hours prior to this, no changes were made. The issue lasted for about 30 minutes, then started working again.
My question is, what was the problem and why would it affect the local side? I get it if there is cloud maintenance or something but this was clearly something with Streamlit itself. So there must be some call home, or data collection that if it fails it hangs the local Streamlit instance as well? This is concerning.
Steps to reproduce
Code snippet:
add code here
If applicable, please provide the steps we should take to reproduce the error or specified behavior.
Expected behavior:
Even if Streamlit is having issues (collecting usage data?), it should not prevent a local instance from working.
Actual behavior:
Both cloud and local instance stopped working
Debug info
Streamlit version: (get it with $ streamlit version)
Python version: (get it with $ python --version)
Using Conda? PipEnv? PyEnv? Pex?
OS version:
Browser version:
Requirements file
Using Conda? PipEnv? PyEnv? Pex? Share the contents of your requirements file here.
Not sure what a requirements file is? Check out this doc and add a requirements file to your app.
Links
Link to your GitHub repo:
Link to your deployed app:
Additional information
If needed, add any other context about the problem here.
Can you share your code? If both cloud and local instance stopped working (and a refresh/new session and app reboot was also not working for both), then I would also be inclined to consider some dependent service outage. However, I haven’t any clue what kinds of things your script does, so I’m not sure what the possibilities are. It is good practice to use try-except to elegantly handle any parts that fall out of your control.
The code is running fine now as it has been for months. I even ran a very simple streamlit page as a test and that hung as well while this issue existed. It’s not the code. There is definitely something that failed on the Streamlit side that prevented both cloud and local from working for a period of time. I am curious what callbacks Streamlit has when you initially run the code that would prevent it from processing. Its not the browser.gatherUsageStats I have that disabled. And more importantly why would it prevent the code from processing if it fails?
I’m not sure what to say without the details. I unplugged my network cord and had no issues initializing or continuing to run my Streamlit apps that don’t have other APIs utilized. (That was on 1.16.0, by the way.) So I don’t see any part of vanilla Streamlit that is dependent on something external. Sorry I can’t help more than that.
Sorry I can’t, but the modules in this app are below, if its related to gspread it might be easy to duplicate? If it happens again I will run a streamlit app thats not using gspread 5.7.2.
import json
import time
import math
import requests
from datetime import date
from datetime import timedelta
import pandas as pd
import streamlit as st
import gspread
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.