简体   繁体   中英

Heroku app successfully deploying, but receiving application error when loading site. But I can seem to find an error

When loading my site it displays the error message;

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

With an application log of;


2021-01-21T10:56:36.186139+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=afternoon-retreat-21879.herokuapp.com request_id=b50977ff-d8c6-4b2f-b633-34965f253af3 fwd="129.0.78.202" dyno= connect= service= status=503 bytes= protocol=https
2021-01-21T10:56:36.841645+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=afternoon-retreat-21879.herokuapp.com request_id=b1224d5b-75d2-4aa3-8411-b5875124475e fwd="129.0.78.202" dyno= connect= service= status=503 bytes= protocol=https
2021-01-21T11:06:56.778335+00:00 app[api]: Starting process with command `python manage.py migrate` by user juniornkiangmatiah@gmail.com
2021-01-21T11:07:05.370028+00:00 heroku[run.9335]: State changed from starting to up
2021-01-21T11:07:05.735946+00:00 heroku[run.9335]: Awaiting client
2021-01-21T11:07:05.789615+00:00 heroku[run.9335]: Starting process with command `python manage.py migrate`
2021-01-21T11:07:29.264945+00:00 heroku[run.9335]: Process exited with status 0
2021-01-21T11:07:29.316386+00:00 heroku[run.9335]: State changed from up to complete
2021-01-21T11:11:12.413411+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=afternoon-retreat-21879.herokuapp.com request_id=eea06fd9-83d9-49c9-93ae-80c64af88963 fwd="129.0.78.202" dyno= connect= service= status=503 bytes= protocol=https
2021-01-21T11:11:13.160682+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=afternoon-retreat-21879.herokuapp.com request_id=839aa9c7-f433-4e82-9fa3-a65fec8530d0 fwd="129.0.78.202" dyno= connect= service= status=503 bytes= protocol=https
Disconnected from log stream. There may be events happening that you do not see here! Attempting to reconnect...
Connection to log stream failed. Please try again later.

And below we have the logs.

-----> Building on the Heroku-20 stack
-----> Python app detected
-----> Installing python-3.6.12
-----> Installing pip 20.1.1, setuptools 47.1.1 and wheel 0.34.2
-----> Installing SQLite3
-----> Installing requirements with pip
       Collecting asgiref==3.3.1
         Downloading asgiref-3.3.1-py3-none-any.whl (19 kB)
       Collecting beautifulsoup4==4.9.3
         Downloading beautifulsoup4-4.9.3-py3-none-any.whl (115 kB)
       Collecting certifi==2020.12.5
         Downloading certifi-2020.12.5-py2.py3-none-any.whl (147 kB)
       Collecting chardet==4.0.0
         Downloading chardet-4.0.0-py2.py3-none-any.whl (178 kB)
       Collecting dj-database-url==0.5.0
         Downloading dj_database_url-0.5.0-py2.py3-none-any.whl (5.5 kB)
       Collecting Django==3.1.3
         Downloading Django-3.1.3-py3-none-any.whl (7.8 MB)
       Collecting django-heroku==0.3.1
         Downloading django_heroku-0.3.1-py2.py3-none-any.whl (6.2 kB)
       Collecting gunicorn==20.0.4
         Downloading gunicorn-20.0.4-py2.py3-none-any.whl (77 kB)
       Collecting heroku==0.1.4
         Downloading heroku-0.1.4.tar.gz (10 kB)
       Collecting idna==2.10
         Downloading idna-2.10-py2.py3-none-any.whl (58 kB)
       Collecting lxml==4.6.2
         Downloading lxml-4.6.2-cp36-cp36m-manylinux1_x86_64.whl (5.5 MB)
       Collecting mysqlclient==2.0.3
         Downloading mysqlclient-2.0.3.tar.gz (88 kB)
       Collecting psycopg2==2.8.6
         Downloading psycopg2-2.8.6.tar.gz (383 kB)
       Collecting python-dateutil==1.5
         Downloading python-dateutil-1.5.tar.gz (233 kB)
       Collecting pytz==2020.4
         Downloading pytz-2020.4-py2.py3-none-any.whl (509 kB)
       Collecting requests==2.25.1
         Downloading requests-2.25.1-py2.py3-none-any.whl (61 kB)
       Collecting soupsieve==2.1
         Downloading soupsieve-2.1-py3-none-any.whl (32 kB)
       Collecting sqlparse==0.4.1
         Downloading sqlparse-0.4.1-py3-none-any.whl (42 kB)
       Collecting urllib3==1.26.2
         Downloading urllib3-1.26.2-py2.py3-none-any.whl (136 kB)
       Collecting whitenoise==5.2.0
         Downloading whitenoise-5.2.0-py2.py3-none-any.whl (19 kB)
       Building wheels for collected packages: heroku, mysqlclient, psycopg2, python-dateutil
         Building wheel for heroku (setup.py): started
         Building wheel for heroku (setup.py): finished with status 'done'
         Created wheel for heroku: filename=heroku-0.1.4-py3-none-any.whl size=12354 sha256=5cd1a4fad0ec0839707d45e445c1f32ab717551fdcdb3053ebc97458cfcfe8fe
         Stored in directory: /tmp/pip-ephem-wheel-cache-y0f7c0my/wheels/5d/ef/d4/c838a955cb48239cbd2c422cc3eebb83bc64165fbe5f7ffade
         Building wheel for mysqlclient (setup.py): started
         Building wheel for mysqlclient (setup.py): finished with status 'done'
         Created wheel for mysqlclient: filename=mysqlclient-2.0.3-cp36-cp36m-linux_x86_64.whl size=109118 sha256=51351b0f5cf4a56e3403238870777ad8fccd7b80debf73fa9dfa532fedb91eea
         Stored in directory: /tmp/pip-ephem-wheel-cache-y0f7c0my/wheels/26/d0/50/9ab7ee785bf3c7485d19fe645ea080478c54a16ab81c771112
         Building wheel for psycopg2 (setup.py): started
         Building wheel for psycopg2 (setup.py): finished with status 'done'
         Created wheel for psycopg2: filename=psycopg2-2.8.6-cp36-cp36m-linux_x86_64.whl size=494287 sha256=cadb600380f86e9ae992ab1b66a4fd8ec10aa7bb86316a4397f24c6f38e71937
         Stored in directory: /tmp/pip-ephem-wheel-cache-y0f7c0my/wheels/cb/74/1b/4b65077db4eb0d85763050e60c5921398d2858945558352dd8
         Building wheel for python-dateutil (setup.py): started
         Building wheel for python-dateutil (setup.py): finished with status 'done'
         Created wheel for python-dateutil: filename=python_dateutil-1.5-py3-none-any.whl size=202993 sha256=374963765e4ede7f64bd77c05a5221b4a35e4b458a23e946dd76fa47ad4b068b
         Stored in directory: /tmp/pip-ephem-wheel-cache-y0f7c0my/wheels/88/db/5e/dfd3878da76519e539d149b134ddeaefa1273694005f6496af
       Successfully built heroku mysqlclient psycopg2 python-dateutil
       Installing collected packages: asgiref, soupsieve, beautifulsoup4, certifi, chardet, dj-database-url, sqlparse, pytz, Django, psycopg2, whitenoise, django-heroku, gunicorn, urllib3, idna, requests, python-dateutil, heroku, lxml, mysqlclient
       Successfully installed Django-3.1.3 asgiref-3.3.1 beautifulsoup4-4.9.3 certifi-2020.12.5 chardet-4.0.0 dj-database-url-0.5.0 django-heroku-0.3.1 gunicorn-20.0.4 heroku-0.1.4 idna-2.10 lxml-4.6.2 mysqlclient-2.0.3 psycopg2-2.8.6 python-dateutil-1.5 pytz-2020.4 requests-2.25.1 soupsieve-2.1 sqlparse-0.4.1 urllib3-1.26.2 whitenoise-5.2.0
-----> $ python manage.py collectstatic --noinput
       132 static files copied to '/tmp/build_24671bb8/staticfiles', 300 post-processed.
-----> Discovering process types
       Procfile declares types -> web
-----> Compressing...
       Done: 63.3M
-----> Launching...
       Released v5
       https://afternoon-retreat-21879.herokuapp.com/ deployed to Heroku

It can't seem to find the error in the Application log and view log.

I can't leave a comment because I don't have enough rep, but it looks like it says:

at=error code=H10

H10 is a crashed app error, looks to me like something with the dyno. What kind of dyno are you using, and what do the memory demands look like?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM