The web-app is crashed when I deployed to Heroku but nothing is changed in the code

浪子不回头ぞ 提交于 2019-12-13 08:14:15

问题


The web-app is crashed when I deployed to Heroku but nothing is changed in the code.

I use python flask and deploy in Heroku

When I deployed my app to Heroku, there are a sequence of errors such that

2019-11-15T14:38:32.117465+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/socket.io/?EIO=3&transport=polling" host=main_project_dev.herokuapp.com request_id=370c951d-185c-4cd6-b15e-13892b6ccb6c fwd="70.164.46.15" dyno= connect= service= status=503 bytes= protocol=https
2019-11-15T14:38:32.243710+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/socket.io/?EIO=3&transport=polling" host=main_project_dev.herokuapp.com request_id=f5c86a7b-690f-4d26-9318-8447f39f22d6 fwd="70.164.46.15" dyno= connect= service= status=503 bytes= protocol=https
2019-11-15T14:38:32.383174+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/socket.io/?EIO=3&transport=polling" host=main_project_dev.herokuapp.com request_id=af38d477-9638-41e2-a63c-73e3c2b5d569 fwd="70.164.46.15" dyno= connect= service= status=503 bytes= protocol=https
(node:6625) ExperimentalWarning: The fs.promises API is experimental
 ���    heroku-cli: update available from 6.12.8 to 6.99.0-ec9edad
2019-11-15T18:27:22.161313+00:00 app[web.1]: 
2019-11-15T18:27:22.161315+00:00 app[web.1]: [Traceback (most recent call last):
2019-11-15T18:27:22.161330+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/util.py", line 98, in load_class
2019-11-15T18:27:22.161332+00:00 app[web.1]:     mod = importlib.import_module('.'.join(components))
2019-11-15T18:27:22.161343+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/importlib/__init__.py", line 126, in import_module
2019-11-15T18:27:22.161346+00:00 app[web.1]:     return _bootstrap._gcd_import(name[level:], package, level)
2019-11-15T18:27:22.161353+00:00 app[web.1]:   File "<frozen importlib._bootstrap>", line 994, in _gcd_import
2019-11-15T18:27:22.161356+00:00 app[web.1]:   File "<frozen importlib._bootstrap>", line 971, in _find_and_load
2019-11-15T18:27:22.161357+00:00 app[web.1]:   File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
2019-11-15T18:27:22.161359+00:00 app[web.1]:   File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
2019-11-15T18:27:22.161361+00:00 app[web.1]:   File "<frozen importlib._bootstrap_external>", line 678, in exec_module
2019-11-15T18:27:22.161363+00:00 app[web.1]:   File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
2019-11-15T18:27:22.161365+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/workers/geventlet.py", line 18, in <module>
2019-11-15T18:27:22.161367+00:00 app[web.1]:     raise RuntimeError("eventlet worker requires eventlet 0.24.1 or higher")
2019-11-15T18:27:22.161369+00:00 app[web.1]: RuntimeError: eventlet worker requires eventlet 0.24.1 or higher
2019-11-15T18:27:22.161371+00:00 app[web.1]: ]
2019-11-15T18:27:22.161373+00:00 app[web.1]: 
2019-11-15T18:27:22.272462+00:00 heroku[web.1]: Process exited with status 1



2019-11-15T18:07:59.142837+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/socket.io/?EIO=3&transport=polling" host=main_project_dev.herokuapp.com request_id=2e9e9e36-604c-46e9-8217-beb9a261bf83 fwd="70.164.46.15" dyno= connect= service= status=503 bytes= protocol=https
2019-11-15T18:07:59.253774+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/socket.io/?EIO=3&transport=polling" host=main_project_dev.herokuapp.com request_id=b44b43af-cf38-470b-b055-3be84dbe8089 fwd="70.164.46.15" dyno= connect= service= status=503 bytes= protocol=https
2019-11-15T18:07:59.382881+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/socket.io/?EIO=3&transport=polling" host=main_project_dev.herokuapp.com request_id=4b11737e-6828-47d9-b071-5614ed0f10a0 fwd="70.164.46.15" dyno= connect= service= status=503 bytes= protocol=https
2019-11-15T18:07:59.494962+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/socket.io/?EIO=3&transport=polling" host=main_project_dev.herokuapp.com request_id=06953b40-a533-46d5-a346-620bb8463560 fwd="70.164.46.15" dyno= connect= service= status=503 bytes= protocol=https

$ heroku logs --tail --app main_project_dev
(node:6625) ExperimentalWarning: The fs.promises API is experimental
 ���    heroku-cli: update available from 6.12.8 to 6.99.0-ec9edad
2019-11-15T18:27:22.161313+00:00 app[web.1]: 
2019-11-15T18:27:22.161315+00:00 app[web.1]: [Traceback (most recent call last):
2019-11-15T18:27:22.161330+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/util.py", line 98, in load_class
2019-11-15T18:27:22.161332+00:00 app[web.1]:     mod = importlib.import_module('.'.join(components))
2019-11-15T18:27:22.161343+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/importlib/__init__.py", line 126, in import_module
2019-11-15T18:27:22.161346+00:00 app[web.1]:     return _bootstrap._gcd_import(name[level:], package, level)
2019-11-15T18:27:22.161353+00:00 app[web.1]:   File "<frozen importlib._bootstrap>", line 994, in _gcd_import
2019-11-15T18:27:22.161356+00:00 app[web.1]:   File "<frozen importlib._bootstrap>", line 971, in _find_and_load
2019-11-15T18:27:22.161357+00:00 app[web.1]:   File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
2019-11-15T18:27:22.161359+00:00 app[web.1]:   File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
2019-11-15T18:27:22.161361+00:00 app[web.1]:   File "<frozen importlib._bootstrap_external>", line 678, in exec_module
2019-11-15T18:27:22.161363+00:00 app[web.1]:   File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
2019-11-15T18:27:22.161365+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/workers/geventlet.py", line 18, in <module>
2019-11-15T18:27:22.161367+00:00 app[web.1]:     raise RuntimeError("eventlet worker requires eventlet 0.24.1 or higher")
2019-11-15T18:27:22.161369+00:00 app[web.1]: RuntimeError: eventlet worker requires eventlet 0.24.1 or higher
2019-11-15T18:27:22.161371+00:00 app[web.1]: ]
2019-11-15T18:27:22.161373+00:00 app[web.1]: 
2019-11-15T18:27:22.272462+00:00 heroku[web.1]: Process exited with status 1
2019-11-15T18:30:13.928369+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/socket.io/?EIO=3&transport=polling" host=main_project_dev.herokuapp.com request_id=966a9856-077a-4756-b2b0-c6cce6b8aaa2 fwd="70.164.46.15" dyno= connect= service= status=503 bytes= protocol=https

But my rollbacked version is okay to deploy in Heroku. I don't know what I did something to the configuration in the local repository. There is no difference between the local code and remote-repository code. (Because I rollbacked to the good version to make the app available.)

But when I git pull or git push, there is nothing changed in local code. When I did a modification(such as adding a space) and push, the app is crashed from rollbacked version but there is nothing changed in the code. Does deployed error or environment error happen?

There is my Procfile: (it is working for rollbacked version)

web: gunicorn --worker-class eventlet -w 1 main:app

this is the requirements.txt:

aiohttp==1.0.5
appdirs==1.4.3
async-timeout==1.2.1
Babel==2.4.0
blinker==1.4
chardet==3.0.4
click==6.7
enum-compat==0.0.2
eventlet==0.21.0
Flask==0.12.2
Flask-BabelEx==0.9.3
Flask-Login==0.4.0
Flask-Mail==0.9.1
Flask-Principal==0.4.0
Flask-Security==3.0.0
Flask-SocketIO==2.9.0
Flask-SQLAlchemy==2.2
Flask-SSLify==0.1.5
Flask-WTF==0.14.2
greenlet==0.4.12
gunicorn>=19.7
itsdangerous==0.24
Jinja2==2.9.6
MarkupSafe==1.0
multidict==3.1.3
packaging==16.8
passlib==1.7.1
psycopg2==2.7.3.1
pyparsing==2.2.0
python-engineio==1.7.0
python-socketio==1.7.6
pytz==2017.2
six==1.10.0
speaklater==1.3
SQLAlchemy==1.1.11
websockets==3.3
Werkzeug==0.14.1
WTForms==2.1
bcrypt==3.1.3
cffi==1.10.0
pycparser==2.18
opentok>=2.5.1
pyowm==2.8.0

I do not know why. I did not do any substantial modifications, the web app is crashed after I git push. After I roll back and try to merge to local code, it says already update. However, the sequence of errors happen.

Please help this question. Thank you very much.

来源:https://stackoverflow.com/questions/59009207/the-web-app-is-crashed-when-i-deployed-to-heroku-but-nothing-is-changed-in-the-c

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!