Closed nop33 closed 8 years ago
My data file was too big (~1GB) and I reduced it significantly by more than half, and it eventually worked. I'm guessing there was this error because pd.read_csv (pandas library's read_csv function) takes very long to read the big file, hence resulting in the crash.
You can also help to debug by adding print statements throughout your main file (app.py in my case) and then looking at the heroku log files to see which statements managed to be printed/ not printed, to figure out at which line does the crash happen.
having the same issue ! any solution ?
Have u tried my solution?
I found two possible solutions:
1) try adding "gunicorn" to your requirements.txt file.
2) make your Procfile like this:
web: gunicorn <application-name>.wsgi --log-file -
2020-08-17T08:02:40.753076+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=musical-instrument.herokuapp.com request_id=0ccaa6ab-61f9-436c-81c8-e950f38581b5 fwd="106.198.170.193" dyno= connect= service= status=503 bytes= protocol=https 2020-08-17T08:02:42.014385+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=musical-instrument.herokuapp.com request_id=0cc841b6-7996-4d07-8b84-ddc553973b59 fwd="106.198.233.145" dyno= connect= service= status=503 bytes= protocol=https
I'm still facing this problem, if somebody has solved this then please help me out.
2020-08-17T08:02:40.753076+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=musical-instrument.herokuapp.com request_id=0ccaa6ab-61f9-436c-81c8-e950f38581b5 fwd="106.198.170.193" dyno= connect= service= status=503 bytes= protocol=https 2020-08-17T08:02:42.014385+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=musical-instrument.herokuapp.com request_id=0cc841b6-7996-4d07-8b84-ddc553973b59 fwd="106.198.233.145" dyno= connect= service= status=503 bytes= protocol=https
I'm still facing this problem, if somebody has solved this then please help me out.
Can you show me which tutorial u used?
https://github.com/IshanSethi9/Musical-instruments Please Check the repo here.
https://github.com/IshanSethi9/Musical-instruments Please Check the repo here.
In ProcFile im not sure if you can us spaces in name of app I mean: web: gunicorn Musical Instruments.wsgi --log-file - ->try to rename app to somthing without white spaces. Make sure u made migrations and migreted it. If it doesnt help, you should check if your project isnt too heavy for free heroku app (i mean music take a lot of memory). And last, i couldnt find it, but I remember I used something in console with '$' at the begin and it helped. It was something like entering a special mode, that i could makemigrations better or something.
I tried it without space,|web: gunicorn MusicalInstruments.wsgi --log-file -|, but still it doesn't work. The project compiled with 222.1 mb of space out of max possible 500 mb so i guess the project isnt too heavy for the software
Does heroku support computer vision? If I check the first line, it is not able to import the cv2 library that is used for computer vision. Issue Resolved.
SAME
Does heroku support computer vision? If I check the first line, it is not able to import the cv2 library that is used for computer vision. Issue Resolved.
did you find any soltions
this error is due to the miss of the .env file , check again your .env file ,and change syntaxe of used port , it will work ,
Le dim. 4 oct. 2020 à 19:06, Bawantha Mihiran Rajapaksha < notifications@github.com> a écrit :
SAME
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/realpython/flask-boilerplate/issues/14#issuecomment-703293150, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJB2EWUIVZSJCHAK2YXF3LDSJC2TZANCNFSM4BEZTEEA .
I was using Python 3.8.6 while the Heroku server was running an older version. Since I'm using features that weren't available in the older version, I got the above error.
Try to update the Python's version on the dyno:
python --version
to find your local versionruntime.txt
file in the project's root folder, and add python-x.y.z
(depending on your version)Up until recently I was able to deploy development build to Heroku and since couple of days ago even out-of-the-box npx create-react-app would fail with H10 code - solution was to ofc deploy the production build like below:
Step 1: Run this command
npm install serve --s
Replace old scripts with this one into the package.json file
"scripts": {
"dev": "react-scripts start",
"start": "serve -s build",
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject",
"heroku-postbuild": "npm run build"
}
*Note: There might come 1 vulnerability along with this, but to fix that, simply run
npm audit fix --force
And not you are ready to see the magic come true ;)
git add .
git commit -m "deploy"
git push heroku master
heroku open
This was the most frustrating problem... But now you have the key I am sure it will work like magic :) Give it a try
Having the same problem with Django and Python=3.6.10
my procfile inlcudes: web: gunicorn .wsgi
Microsoft Windows [Version 6.3.9600] (c) 2013 Microsoft Corporation. All rights reserved.
C:\windows\system32>heroku logs --tail » Error: Missing required flag: » -a, --app APP app to run command against » See more help with --help
C:\windows\system32>heroku logs --tail -a healtech
2021-01-11T15:02:05.933848+00:00 app[web.1]: [2021-01-11 15:02:05 +0000] [11] [I
NFO] Worker exiting (pid: 11)
2021-01-11T15:02:05.933853+00:00 app[web.1]: [2021-01-11 15:02:05 +0000] [10] [E
RROR] Exception in worker process
2021-01-11T15:02:05.933854+00:00 app[web.1]: Traceback (most recent call last):
2021-01-11T15:02:05.933855+00:00 app[web.1]: File "/app/.heroku/python/lib/pytho
n3.6/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
2021-01-11T15:02:05.933855+00:00 app[web.1]: worker.init_process()
2021-01-11T15:02:05.933855+00:00 app[web.1]: File "/app/.heroku/python/lib/pytho
n3.6/site-packages/gunicorn/workers/base.py", line 119, in init_process
2021-01-11T15:02:05.933856+00:00 app[web.1]: self.load_wsgi()
2021-01-11T15:02:05.933856+00:00 app[web.1]: File "/app/.heroku/python/lib/pytho
n3.6/site-packages/gunicorn/workers/base.py", line 144, in load_wsgi
2021-01-11T15:02:05.933856+00:00 app[web.1]: self.wsgi = self.app.wsgi()
2021-01-11T15:02:05.933857+00:00 app[web.1]: File "/app/.heroku/python/lib/pytho
n3.6/site-packages/gunicorn/app/base.py", line 67, in wsgi
2021-01-11T15:02:05.933857+00:00 app[web.1]: self.callable = self.load()
2021-01-11T15:02:05.933857+00:00 app[web.1]: File "/app/.heroku/python/lib/pytho
n3.6/site-packages/gunicorn/app/wsgiapp.py", line 49, in load
2021-01-11T15:02:05.933858+00:00 app[web.1]: return self.load_wsgiapp()
2021-01-11T15:02:05.933858+00:00 app[web.1]: File "/app/.heroku/python/lib/pytho
n3.6/site-packages/gunicorn/app/wsgiapp.py", line 39, in load_wsgiapp
2021-01-11T15:02:05.933859+00:00 app[web.1]: return util.import_app(self.app_uri
)
2021-01-11T15:02:05.933859+00:00 app[web.1]: File "/app/.heroku/python/lib/pytho
n3.6/site-packages/gunicorn/util.py", line 358, in import_app
2021-01-11T15:02:05.933859+00:00 app[web.1]: mod = importlib.import_module(modul
e)
2021-01-11T15:02:05.933860+00:00 app[web.1]: File "/app/.heroku/python/lib/pytho
n3.6/importlib/init.py", line 126, in import_module
2021-01-11T15:02:05.933860+00:00 app[web.1]: return _bootstrap._gcd_import(name[
level:], package, level)
2021-01-11T15:02:05.933861+00:00 app[web.1]: File "
2021-01-11T15:02:06.408675+00:00 heroku[web.1]: State changed from crashed to st
arting
2021-01-11T15:02:49.936312+00:00 heroku[web.1]: Starting process with command g unicorn HealTech.wsgi --log-file -
2021-01-11T15:02:50.000000+00:00 app[api]: Build succeeded
2021-01-11T15:02:54.195478+00:00 app[web.1]: [2021-01-11 15:02:54 +0000] [4] [IN
FO] Starting gunicorn 20.0.4
2021-01-11T15:02:54.196657+00:00 app[web.1]: [2021-01-11 15:02:54 +0000] [4] [IN
FO] Listening at: http://0.0.0.0:36107 (4)
2021-01-11T15:02:54.201883+00:00 app[web.1]: [2021-01-11 15:02:54 +0000] [4] [IN
FO] Using worker: sync
2021-01-11T15:02:54.217181+00:00 app[web.1]: [2021-01-11 15:02:54 +0000] [10] [I
NFO] Booting worker with pid: 10
2021-01-11T15:02:54.234018+00:00 app[web.1]: [2021-01-11 15:02:54 +0000] [10] [E
RROR] Exception in worker process
2021-01-11T15:02:54.234035+00:00 app[web.1]: Traceback (most recent call last):
2021-01-11T15:02:54.234040+00:00 app[web.1]: File "/app/.heroku/python/lib/pytho
n3.6/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
2021-01-11T15:02:54.234045+00:00 app[web.1]: worker.init_process()
2021-01-11T15:02:54.234045+00:00 app[web.1]: File "/app/.heroku/python/lib/pytho
n3.6/site-packages/gunicorn/workers/base.py", line 119, in init_process
2021-01-11T15:02:54.234046+00:00 app[web.1]: self.load_wsgi()
2021-01-11T15:02:54.234046+00:00 app[web.1]: File "/app/.heroku/python/lib/pytho
n3.6/site-packages/gunicorn/workers/base.py", line 144, in load_wsgi
2021-01-11T15:02:54.234046+00:00 app[web.1]: self.wsgi = self.app.wsgi()
2021-01-11T15:02:54.234051+00:00 app[web.1]: File "/app/.heroku/python/lib/pytho
n3.6/site-packages/gunicorn/app/base.py", line 67, in wsgi
2021-01-11T15:02:54.234051+00:00 app[web.1]: self.callable = self.load()
2021-01-11T15:02:54.234051+00:00 app[web.1]: File "/app/.heroku/python/lib/pytho
n3.6/site-packages/gunicorn/app/wsgiapp.py", line 49, in load
2021-01-11T15:02:54.234052+00:00 app[web.1]: return self.load_wsgiapp()
2021-01-11T15:02:54.234052+00:00 app[web.1]: File "/app/.heroku/python/lib/pytho
n3.6/site-packages/gunicorn/app/wsgiapp.py", line 39, in load_wsgiapp
2021-01-11T15:02:54.234052+00:00 app[web.1]: return util.import_app(self.app_uri
)
2021-01-11T15:02:54.234053+00:00 app[web.1]: File "/app/.heroku/python/lib/pytho
n3.6/site-packages/gunicorn/util.py", line 358, in import_app
2021-01-11T15:02:54.234053+00:00 app[web.1]: mod = importlib.import_module(modul
e)
2021-01-11T15:02:54.234053+00:00 app[web.1]: File "/app/.heroku/python/lib/pytho
n3.6/importlib/init.py", line 126, in import_module
2021-01-11T15:02:54.234054+00:00 app[web.1]: return _bootstrap._gcd_import(name[
level:], package, level)
2021-01-11T15:02:54.234054+00:00 app[web.1]: File "
In the Procfile,
Add correct name of the main routing file, here <_main-routing-python_>
web: gunicorn <_main-routing-python_>:app
this worked for me. Thanks alot!
Another solution:
Check if your application has 'gunicorn' installed with pip freeze
, if not, run the command pip install gunicorn
.
After that, run pip freeze > requirements.txt
With that it will create a file with the current requirements of your application, note that 'gunicorn' will be in it.
i'm having the same problem, i tried everything my Procfile is web: gunicorn index:server --preload --timeout300
I'm having the same issue, I tried all the suggestions in this thread and more from googling the error, but nothing worked :(
Hi, hope this is still usefull and on topic, but I have been struggling also with this app crashed issue using Flask to deploy my API. I am also new to Heroku so I had not much clue of what I was doing. But check well the result of the "heroku logs --tail". What happened in my case was that there was nothing wrong with ports, Procfile, requirements or that kind of things. The code I had to deal with the data the API was handling WAS WRONG. So that is why it was crushing, once fixed everything worked fine.
Heyy, Check your procfile and make sure all your dependencies are well set.
On Fri, 12 Nov 2021, 23:38 Matt, @.***> wrote:
Hi, hope this is still usefull and on topic, but I have been struggling also with this app crashed issue using Flask to deploy my API. I am also new to Heroku so I had not much clue of what I was doing. But check well the result of the "heroku logs --tail". What happened in my case was that there was nothing wrong with ports, Procfile, requirements or that kind of things. The code I had to deal with the data the API was handling WAS WRONG. So that is why it was crushing, once fixed everything worked fine.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/realpython/flask-boilerplate/issues/14#issuecomment-967706500, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOIAFHY7RSIHQ7SWQVFG5R3ULWJOXANCNFSM4BEZTEEA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
Make sure you not uploading the virtual environment directory in the remote repo.
Please help I have the Procfile in my repo but I am still getting the H10 error. I have no idea why.
change your Procfile to encoding to UTF-8 very sure answer
Hello, I followed the steps in your README file to clone the repo and deploy the app on Heroku. I immediately got the following errors when opening the website: Gist
Here's is the history of what I did exactly:
The app is running properly on localhost. Did I miss something? Thanks