1

My first time deploying streamlit on Heroku, and the scripts are on this GitHub. I'm actually deploying from local, so this is just to share my scripts to debug. The following is the error message.

2020-12-31T23:47:18.055589+00:00 heroku[router]: 
at=error code=H20 desc="App boot timeout" 
method=GET path="/" host=stormy-dawn-49490.herokuapp.com
request_id=b3df4074-d363-41e5-8ecd-d101070679f7 
fwd="99.230.168.115" 
dyno= connect= service= status=503 bytes= protocol=https

2020-12-31T23:48:01.327576+00:00 heroku[web.1]: Error R10 (Boot timeout) -> 
Web process failed to bind to $PORT within 60 seconds of launch

I have four scripts, which is also linked to my GitHub repository the beginning of the question.

setup.sh

mkdir -p ~/.streamlit/
echo “\
[general]\n\
email = \”<dont@spam.us>\”\n\
“ > ~/.streamlit/credentials.toml
echo “\
[server]\n\
headless = true\n\
enableCORS=false\n\
port = $PORT\n\
“ > ~/.streamlit/config.toml

Procfile:

web: sh setup.sh && streamlit run app.py

requirements.txt:

fredapi==0.4.2
numpy==1.18.5
pandas==1.1.5
plotly==4.14.1
python-dateutil==2.8.1
python-slugify==4.0.1
Quandl==3.5.3
scikit-learn==0.23.2
streamlit==0.72.0
yfinance==0.1.55
gunicorn== 19.9.0

app.py: I'd suggest read here I didn't put much in the app.py as I'm just trying how to deploy on Heroku

Thank you in advance!

Martin Zeitler
  • 59,798
  • 15
  • 122
  • 186
Ian Yu
  • 47
  • 4
  • Welcome to Stack Overflow. Please read [ask]. It's pretty hard to help with mystery code we can't see. – Chris Jan 01 '21 at 00:21
  • Though: "Web process failed to bind to $PORT within 60 seconds of launch"—have you tried to bind to the port given by the `PORT` environment variable? – Chris Jan 01 '21 at 00:22
  • Does this answer your question? [Heroku + node.js error (Web process failed to bind to $PORT within 60 seconds of launch)](https://stackoverflow.com/questions/15693192/heroku-node-js-error-web-process-failed-to-bind-to-port-within-60-seconds-of) – Martin Zeitler Jan 01 '21 at 00:24
  • @MartinZeitler Unfortunately, it dosn't. – Ian Yu Jan 01 '21 at 00:49
  • @Chris I'm going to edit the question now – Ian Yu Jan 01 '21 at 00:49
  • @IanYu Your app needs to bind to `process.env.PORT` when deployed... which it obviously doesn't. – Martin Zeitler Jan 01 '21 at 00:54
  • @MartinZeitler I included the codes for my setup.py. Would that not be enough? – Ian Yu Jan 01 '21 at 00:57
  • It's nevertheless an exact duplicate of: https://stackoverflow.com/a/65455211/549372 – Martin Zeitler Jan 01 '21 at 01:27
  • @MartinZeitler Thank you! The exact issue was actually as the code for setup.sh was copied, for somehow the double quotation was not recognized! I now am able to run it! – Ian Yu Jan 01 '21 at 02:42
  • @MartinZeitler If you would post an answer, however, I'd love to select you as the solution – Ian Yu Jan 01 '21 at 02:42
  • @IanYu I don't care much about reputation (just see my profile) and refrain from posting copy & paste answers. Instead, better upvote the one answer, which I've linked (that's how this site works). – Martin Zeitler Jan 01 '21 at 04:08
  • @MartinZeitler will do! – Ian Yu Jan 01 '21 at 09:40

0 Answers0