Streamlit Sharing Server dies then doesn't reboot itself

My app deploys just fine, runs just fine for a long time, then inexplicably the VM it’s on will crash, and serve ‘failure running app’. The log says after it crashes it fails on relaunch, but everything works fine after rebooting the instance.

  1. the logs don’t express any error which is useful to understand why the app needs to be rebooted.
  2. why if streamlit’s cloud agents can tell the vm is unresponsive, don’t they automatically reboot the app?

Best-
John

Hey @jpartemis,

First, welcome to the Streamlit community! :partying_face: :partying_face: :fireworks: :tada: :tada:

Can you send me the link to the Github repo you’re deploying from? and a copy of the logs (you can download the logs from your app with the 3 vertical dots when you click the “manage app” at the bottom right corner)

I can answer your second question now though, let me fill you in on this story! :nerd_face:

We actually used to reboot people’s apps for them when they crashed, but the majority of the time it ended up creating an app crash loop. It turned out that in most cases the app started crashing because it hit the memory limits (or leaks), then it would crash and we would automatically reboot them. :face_with_monocle:

But then that app would behave in the exact same way (cause none of the code had changed) and would hit the memory limit and crash, starting the loop over again. :pensive:

So we decided to remove automatically rebooting apps and we are working on auto-generated emails from our system, that will let developers know their memory usage, and when their app has crashed to help them with these issues! :incoming_envelope:

But once I get the logs and link to your repo I can take a look and we can work on a solution for you!

Happy Streamlit-ing!
Marisa

1 Like

Thanks Marisa-
https://github.com/jpartemis/cwarp/cwarp_app.py
Here’s the log… I took the liberty of highlighting the only output from the crash cycle.

e[32m[manager] e[0mStarting up for owner: ‘jpartemis’, repository: ‘cwarp’, branch: ‘main’, main module: ‘cwarp_app.py’
e[32m[manager] e[0mCloning repository …
e[32m[manager] e[0mCloning into ‘cwarp’…

e[32m[manager] e[0mCloned repository!
e[32m[manager] e[0mProcessing dependencies …
Collecting pandas
Downloading pandas-1.2.4-cp37-cp37m-manylinux1_x86_64.whl (9.9 MB)
Collecting numpy
Downloading numpy-1.20.3-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (15.3 MB)
Collecting matplotlib
Downloading matplotlib-3.4.2-cp37-cp37m-manylinux1_x86_64.whl (10.3 MB)
Collecting seaborn
Downloading seaborn-0.11.1-py3-none-any.whl (285 kB)
Collecting yfinance
Downloading yfinance-0.1.59.tar.gz (25 kB)
Collecting python-dateutil>=2.7.3
Downloading python_dateutil-2.8.1-py2.py3-none-any.whl (227 kB)
Collecting pytz>=2017.3
Downloading pytz-2021.1-py2.py3-none-any.whl (510 kB)
Collecting six>=1.5
Downloading six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting pyparsing>=2.2.1
Downloading pyparsing-2.4.7-py2.py3-none-any.whl (67 kB)
Collecting cycler>=0.10
Downloading cycler-0.10.0-py2.py3-none-any.whl (6.5 kB)
Collecting kiwisolver>=1.0.1
Downloading kiwisolver-1.3.1-cp37-cp37m-manylinux1_x86_64.whl (1.1 MB)
Collecting pillow>=6.2.0
Downloading Pillow-8.2.0-cp37-cp37m-manylinux1_x86_64.whl (3.0 MB)
Collecting scipy>=1.0
Downloading scipy-1.6.3-cp37-cp37m-manylinux1_x86_64.whl (27.4 MB)
Collecting requests>=2.20
Downloading requests-2.25.1-py2.py3-none-any.whl (61 kB)
Collecting multitasking>=0.0.7
Downloading multitasking-0.0.9.tar.gz (8.1 kB)
Collecting lxml>=4.5.1
Downloading lxml-4.6.3-cp37-cp37m-manylinux2014_x86_64.whl (6.3 MB)
Collecting urllib3<1.27,>=1.21.1
Downloading urllib3-1.26.5-py2.py3-none-any.whl (138 kB)
Collecting idna<3,>=2.5
Downloading idna-2.10-py2.py3-none-any.whl (58 kB)
Collecting certifi>=2017.4.17
Downloading certifi-2021.5.30-py2.py3-none-any.whl (145 kB)
Collecting chardet<5,>=3.0.2
Downloading chardet-4.0.0-py2.py3-none-any.whl (178 kB)
Building wheels for collected packages: yfinance, multitasking
Building wheel for yfinance (setup.py): started
Building wheel for yfinance (setup.py): finished with status ‘done’
Created wheel for yfinance: filename=yfinance-0.1.59-py2.py3-none-any.whl size=23442 sha256=a1524239028f18517301f3d0046b39732700b477999e9451ad5faa60ec33ca08
Stored in directory: /tmp/pip-ephem-wheel-cache-b_0soxpi/wheels/26/af/8b/fac1b47dffef567f945641cdc9b67bb25fae5725d462a8cf81
Building wheel for multitasking (setup.py): started
Building wheel for multitasking (setup.py): finished with status ‘done’
Created wheel for multitasking: filename=multitasking-0.0.9-py3-none-any.whl size=8368 sha256=7d10f8fc936058acb2f8d937a231ca63b2540acab1560896ff566acb05390672
Stored in directory: /tmp/pip-ephem-wheel-cache-b_0soxpi/wheels/ae/25/47/4d68431a7ec1b6c4b5233365934b74c1d4e665bf5f968d363a
Successfully built yfinance multitasking
Installing collected packages: six, urllib3, pytz, python-dateutil, pyparsing, pillow, numpy, kiwisolver, idna, cycler, chardet, certifi, scipy, requests, pandas, multitasking, matplotlib, lxml, yfinance, seaborn
Attempting uninstall: six
Found existing installation: six 1.16.0
Uninstalling six-1.16.0:
Successfully uninstalled six-1.16.0
Attempting uninstall: urllib3
Found existing installation: urllib3 1.26.4
Uninstalling urllib3-1.26.4:
Successfully uninstalled urllib3-1.26.4
Attempting uninstall: pytz
Found existing installation: pytz 2021.1
Uninstalling pytz-2021.1:
Successfully uninstalled pytz-2021.1
Attempting uninstall: python-dateutil
Found existing installation: python-dateutil 2.8.1
Uninstalling python-dateutil-2.8.1:
Successfully uninstalled python-dateutil-2.8.1
Attempting uninstall: pyparsing
Found existing installation: pyparsing 2.4.7
Uninstalling pyparsing-2.4.7:
Successfully uninstalled pyparsing-2.4.7
Attempting uninstall: pillow
Found existing installation: Pillow 8.2.0
Uninstalling Pillow-8.2.0:
Successfully uninstalled Pillow-8.2.0
Attempting uninstall: numpy
Found existing installation: numpy 1.20.2
Uninstalling numpy-1.20.2:
Successfully uninstalled numpy-1.20.2
Attempting uninstall: idna
Found existing installation: idna 2.10
Uninstalling idna-2.10:
Successfully uninstalled idna-2.10
Attempting uninstall: chardet
Found existing installation: chardet 4.0.0
Uninstalling chardet-4.0.0:
Successfully uninstalled chardet-4.0.0
Attempting uninstall: certifi
Found existing installation: certifi 2020.12.5
Uninstalling certifi-2020.12.5:
Successfully uninstalled certifi-2020.12.5
Attempting uninstall: requests
Found existing installation: requests 2.25.1
Uninstalling requests-2.25.1:
Successfully uninstalled requests-2.25.1
Attempting uninstall: pandas
Found existing installation: pandas 1.2.4
Uninstalling pandas-1.2.4:
Successfully uninstalled pandas-1.2.4
Successfully installed certifi-2021.5.30 chardet-4.0.0 cycler-0.10.0 idna-2.10 kiwisolver-1.3.1 lxml-4.6.3 matplotlib-3.4.2 multitasking-0.0.9 numpy-1.20.3 pandas-1.2.4 pillow-8.2.0 pyparsing-2.4.7 python-dateutil-2.8.1 pytz-2021.1 requests-2.25.1 scipy-1.6.3 seaborn-0.11.1 six-1.16.0 urllib3-1.26.5 yfinance-0.1.59
e[35mWARNINGe[0m: You are using pip version 21.1.1; however, version 21.1.2 is available.
You should consider upgrading via the ‘/home/appuser/venv/bin/python -m pip install --upgrade pip’ command.
e[32m[manager] e[0mPython dependencies were installed from /app/cwarp/requirements.txt using pip.
2021-06-04 14:36:37.485 An update to the [server] config option section was detected. To have these changes be reflected, please restart streamlit.
e[32m[manager] e[0mProcessed dependencies!
2021-06-04 14:36:37.896 generated new fontManager

e[32m[manager] e[0mStreamlit server consistently failed status checks
e[32m[manager] e[0mPlease fix the errors, push an update to the git repo, or reboot the app.
[client] Provisioning machine…
[client] Preparing system…
[client] Spinning up manager process…
e[32m[manager] e[0mStarting up for owner: ‘jpartemis’, repository: ‘cwarp’, branch: ‘main’, main module: ‘cwarp_app.py’
e[32m[manager] e[0mCloning repository …
e[32m[manager] e[0mCloning into ‘cwarp’…

e[32m[manager] e[0mCloned repository!
e[32m[manager] e[0mProcessing dependencies …
Collecting pandas
Downloading pandas-1.2.4-cp37-cp37m-manylinux1_x86_64.whl (9.9 MB)
Collecting numpy
Downloading numpy-1.20.3-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (15.3 MB)
Collecting matplotlib
Downloading matplotlib-3.4.2-cp37-cp37m-manylinux1_x86_64.whl (10.3 MB)
Collecting seaborn
Downloading seaborn-0.11.1-py3-none-any.whl (285 kB)
Collecting yfinance
Downloading yfinance-0.1.59.tar.gz (25 kB)
Collecting python-dateutil>=2.7.3
Downloading python_dateutil-2.8.1-py2.py3-none-any.whl (227 kB)
Collecting pytz>=2017.3
Downloading pytz-2021.1-py2.py3-none-any.whl (510 kB)
Collecting six>=1.5
Downloading six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting kiwisolver>=1.0.1
Downloading kiwisolver-1.3.1-cp37-cp37m-manylinux1_x86_64.whl (1.1 MB)
Collecting cycler>=0.10
Downloading cycler-0.10.0-py2.py3-none-any.whl (6.5 kB)
Collecting pillow>=6.2.0
Downloading Pillow-8.2.0-cp37-cp37m-manylinux1_x86_64.whl (3.0 MB)
Collecting pyparsing>=2.2.1
Downloading pyparsing-2.4.7-py2.py3-none-any.whl (67 kB)
Collecting scipy>=1.0
Downloading scipy-1.6.3-cp37-cp37m-manylinux1_x86_64.whl (27.4 MB)
Collecting requests>=2.20
Downloading requests-2.25.1-py2.py3-none-any.whl (61 kB)
Collecting multitasking>=0.0.7
Downloading multitasking-0.0.9.tar.gz (8.1 kB)
Collecting lxml>=4.5.1
Downloading lxml-4.6.3-cp37-cp37m-manylinux2014_x86_64.whl (6.3 MB)
Collecting chardet<5,>=3.0.2
Downloading chardet-4.0.0-py2.py3-none-any.whl (178 kB)
Collecting idna<3,>=2.5
Downloading idna-2.10-py2.py3-none-any.whl (58 kB)
Collecting certifi>=2017.4.17
Downloading certifi-2021.5.30-py2.py3-none-any.whl (145 kB)
Collecting urllib3<1.27,>=1.21.1
Downloading urllib3-1.26.5-py2.py3-none-any.whl (138 kB)
Building wheels for collected packages: yfinance, multitasking
Building wheel for yfinance (setup.py): started
Building wheel for yfinance (setup.py): finished with status ‘done’
Created wheel for yfinance: filename=yfinance-0.1.59-py2.py3-none-any.whl size=23442 sha256=7361907a0d9cc042ff490281380d4625babcc86d741aaf270e9383f799e8bd48
Stored in directory: /tmp/pip-ephem-wheel-cache-_gqgw_xq/wheels/26/af/8b/fac1b47dffef567f945641cdc9b67bb25fae5725d462a8cf81
Building wheel for multitasking (setup.py): started
Building wheel for multitasking (setup.py): finished with status ‘done’
Created wheel for multitasking: filename=multitasking-0.0.9-py3-none-any.whl size=8368 sha256=348f1c9fbae5d45cd8f28f8dd86b37c17cbbdc2535db69bf6663be8d427be541
Stored in directory: /tmp/pip-ephem-wheel-cache-_gqgw_xq/wheels/ae/25/47/4d68431a7ec1b6c4b5233365934b74c1d4e665bf5f968d363a
Successfully built yfinance multitasking
Installing collected packages: six, urllib3, pytz, python-dateutil, pyparsing, pillow, numpy, kiwisolver, idna, cycler, chardet, certifi, scipy, requests, pandas, multitasking, matplotlib, lxml, yfinance, seaborn
Attempting uninstall: six
Found existing installation: six 1.16.0
Uninstalling six-1.16.0:
Successfully uninstalled six-1.16.0
Attempting uninstall: urllib3
Found existing installation: urllib3 1.26.4
Uninstalling urllib3-1.26.4:
Successfully uninstalled urllib3-1.26.4
Attempting uninstall: pytz
Found existing installation: pytz 2021.1
Uninstalling pytz-2021.1:
Successfully uninstalled pytz-2021.1
Attempting uninstall: python-dateutil
Found existing installation: python-dateutil 2.8.1
Uninstalling python-dateutil-2.8.1:
Successfully uninstalled python-dateutil-2.8.1
Attempting uninstall: pyparsing
Found existing installation: pyparsing 2.4.7
Uninstalling pyparsing-2.4.7:
Successfully uninstalled pyparsing-2.4.7
Attempting uninstall: pillow
Found existing installation: Pillow 8.2.0
Uninstalling Pillow-8.2.0:
Successfully uninstalled Pillow-8.2.0
Attempting uninstall: numpy
Found existing installation: numpy 1.20.2
Uninstalling numpy-1.20.2:
Successfully uninstalled numpy-1.20.2
Attempting uninstall: idna
Found existing installation: idna 2.10
Uninstalling idna-2.10:
Successfully uninstalled idna-2.10
Attempting uninstall: chardet
Found existing installation: chardet 4.0.0
Uninstalling chardet-4.0.0:
Successfully uninstalled chardet-4.0.0
Attempting uninstall: certifi
Found existing installation: certifi 2020.12.5
Uninstalling certifi-2020.12.5:
Successfully uninstalled certifi-2020.12.5
Attempting uninstall: requests
Found existing installation: requests 2.25.1
Uninstalling requests-2.25.1:
Successfully uninstalled requests-2.25.1
Attempting uninstall: pandas
Found existing installation: pandas 1.2.4
Uninstalling pandas-1.2.4:
Successfully uninstalled pandas-1.2.4
Successfully installed certifi-2021.5.30 chardet-4.0.0 cycler-0.10.0 idna-2.10 kiwisolver-1.3.1 lxml-4.6.3 matplotlib-3.4.2 multitasking-0.0.9 numpy-1.20.3 pandas-1.2.4 pillow-8.2.0 pyparsing-2.4.7 python-dateutil-2.8.1 pytz-2021.1 requests-2.25.1 scipy-1.6.3 seaborn-0.11.1 six-1.16.0 urllib3-1.26.5 yfinance-0.1.59
e[35mWARNINGe[0m: You are using pip version 21.1.1; however, version 21.1.2 is available.
You should consider upgrading via the ‘/home/appuser/venv/bin/python -m pip install --upgrade pip’ command.
e[32m[manager] e[0mPython dependencies were installed from /app/cwarp/requirements.txt using pip.
e[32m[manager] e[0mProcessed dependencies!
2021-06-04 15:08:32.976 An update to the [server] config option section was detected. To have these changes be reflected, please restart streamlit.
2021-06-04 15:08:33.463 generated new fontManager

A new version of Streamlit is available.

See what’s new at https://discuss.streamlit.io/c/announcements

Enter the following command to upgrade:
$ pip install streamlit --upgrade

[client] Connecting…

Hey @jpartemis,

thanks for the logs, but when I click your repo link it brings me to a 404 page. I was able to get to your repo though with this:

1 Like