0

I'm trying to deploy my django website to heroku but I get an Application Error shown on the webpage. Looking at my logs using heroku logs --tail (what it tells me to do on webpage), I recieve an error

2019-07-27T06:14:34.046386+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/" host=prremia.herokuapp.com request_id=20cd473d-50c2-43b6-892e-ce8f8981229d fwd="49.36.8.33" dyno= connect= service= status=503 bytes= protocol=https
2019-07-27T06:14:34.878053+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/favicon.ico" host=prremia.herokuapp.com request_id=53c5e449-ba17-4e93-86f9-7b70eeb7e074 fwd="49.36.8.33" dyno= connect= service= status=503 bytes= protocol=https

I followed the instructions from Django's docs.

  • Django 2.2.3
  • Python 3.7.3
  • Heroku-18

My webpage: What my webpage looks like

7
  • This question has the answer stackoverflow.com/questions/18552846/… or you can manually scale using the heroku doc , check devcenter.heroku.com/articles/scaling Commented Jul 27, 2019 at 6:40
  • @BidhanMajhi When trying to scale using heroku ps:scale web=1 I get an error saying that they couldn't find the web process type. Procfile includes web: gunicorn prremia.wsgi Commented Jul 27, 2019 at 6:47
  • Go to your heroku dashboard, then in dashboard go to resources and check, if you have dynos. Commented Jul 27, 2019 at 6:53
  • @BidhanMajhi It tells me that I haven't made a Procfile but as I said above, I do, and I made sure to push it onto heroku. Commented Jul 27, 2019 at 6:57
  • Change your Procfile to web: gunicorn prremia.wsgi --log-file - And make sure you commit it. Commented Jul 27, 2019 at 6:59

2 Answers 2

1

Make sure your put your Procfile at the root of project along with manage.py. Also make sure you pushed the code from your project root. Bind port dynamically in your Procfile. Here's an example:-

web: gunicorn --bind 0.0.0.0:$PORT prremia.wsgi

$PORT is an environment variable. You must do scaling too.

Note: Make sure your project name exactly matches with <project_name>.wsgi in your Procfile.

Sign up to request clarification or add additional context in comments.

6 Comments

I have made sure to push my Procfile and I did scale, but I how would I set this all up. (I mean the IP and $PORT)
Just put the content in your Procfile as I've mentioned.
So, 0.0.0.0.$PORT is the website?? Wut? I'm really confused
Google and read some basic stuff about ip address and you'll find out. For now try to build again putting those content in your Procfile.
Hmm, still not working. But I did find something interesting... The error also says no module named 'prremia'
|
0

Some time silly mistake is there when some one create Procfile as text file so use the given command in your cmd to generate Prockfile:-

echo "web: python app.py" > Procfile

// I hope my answer help you.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.