After deploying Django apps to heroku, the app is not displayed.



  • After deploying Django apps to heroku, the app is not displayed.
    After deploying, open the app URL and
    The following error occurred.

    Application error
    An error occurred in the application and your page could not be served. If you are the application owner, check your logs for details. You can do this from the Heroku CLI with the command
    heroku logs --tail
    

    When you confirm that you need to chuck the log
    I found the following error, but I could not find a clear answer if I searched.
    What causes this error (at=error code=H10 desc="App crashed")?
    In addition, if you have a solution, you can advise.

    2020-12-11T07:28:47.775779+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=hogehoge.herokuapp.com request_id=ea446ace-d220-4db4-bab8-4466266d8650 fwd="69.118.84.101" dyno= connect= service= status=503 bytes= protocol=https
    2020-12-11T07:28:47.909678+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=hogehoge.herokuapp.com request_id=c5b7a954-6d34-4a6e-87e1-2428df78ae29 fwd="69.118.84.101" dyno= connect= service= status=503 bytes= protocol=https
    

    2020-12-11T07:04:39.534550+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=hogehoge.herokuapp.com request_id=58dbe69a-0704-44f8-aefb-ff777769a7a8 fwd="69.118.84.101" dyno= connect= service= status=503 bytes= protocol=https
    2020-12-11T07:04:40.143720+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=hogehoge.herokuapp.com request_id=be70bdb3-5501-4f94-837f-785c694ef87e fwd="69.118.84.101" dyno= connect= service= status=503 bytes= protocol=https



  • I think the error code of the question is the timeout of the application crashed or startup.
    https://devcenter.heroku.com/articles/error-codes#h10-app-crashed

    To run an app on Heroku

    • requirements.txt
    • Procfile
    • runtime.txt

    There are three options: All, define the root of the repository.

    requirements.txt

    pip freeze > requirements.txt
    

    requirements.txt execute the above command in the repository root.

    Procfile

    web: gunicorn myproject.wsgi
    

    runtime.txt

    python-3.9.0
    

    Please write Procfile and runtime.txt.
    Procfilemyproject.wsgiChange the project name.
    The django server is not suitable for the operation environment, so it uses gunicorn.
    Before creating requirements.txt, execute the following command:

    pip install gunicorn
    

    Link
    https://devcenter.heroku.com/ja/articles/django-app-configuration
    https://devcenter.heroku.com/ja/articles/deploying-python
    https://devcenter.heroku.com/ja/articles/getting-started-with-python




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2