Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploying app on Heroku (code=H10 desc="App crashed") #14

Closed
nop33 opened this issue May 23, 2015 · 73 comments · Fixed by #15
Closed

Deploying app on Heroku (code=H10 desc="App crashed") #14

nop33 opened this issue May 23, 2015 · 73 comments · Fixed by #15

Comments

@nop33
Copy link
Contributor

nop33 commented May 23, 2015

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:

git clone https://github.com/mjhea0/flask-boilerplate.git
cd flask-boilerplate
virtualenv --no-site-packages env
source env/bin/activate
pip install -r requirements.txt
python app.py
heroku login
heroku create
git push heroku master
heroku open

The app is running properly on localhost.
Did I miss something?
Thanks

@nop33
Copy link
Contributor Author

nop33 commented May 23, 2015

I figured out that I have to use web: gunicorn app:app --log-file=- in the Procfile.

@ni8mr
Copy link

ni8mr commented Jul 15, 2015

Hello @nop33 , i have faced same problem and i have applied your solution (by editing procfile). But the result is same. (Application Error on Heroku)

@mjhea0 , can you please look at this problem :)

@mjhea0
Copy link
Collaborator

mjhea0 commented Jul 15, 2015

Can you see what the error is? Run - heroku logs.

@ni8mr
Copy link

ni8mr commented Jul 15, 2015

@mjhea0 , here is my errors (from the error logs)-

I have three types of error.

At first- Error R10 (Boot timeout ) -> Web process failed to bind to $PORT within 60 seconds of launch.
Heroku R10 Error- https://devcenter.heroku.com/articles/error-codes#r10-boot-timeout

After that, i have a H20 error- desc="App crashed" method=GET path="/favicon.ico" host=.... request_id=... fwd=.... dyno=connect=service=status=503 bytes= (blank)
Heroku H20 error- https://devcenter.heroku.com/articles/error-codes#h20-app-boot-timeout

Then, i have a H10 error-- desc="App crashed" method=GET path="/favicon.ico" host=.... request_id=... fwd=.... dyno=connect=service=status=503 bytes= (blank)
Heroku H10 error- https://devcenter.heroku.com/articles/error-codes#h10-app-crashed

@mjhea0
Copy link
Collaborator

mjhea0 commented Jul 16, 2015

Your procfile is not correct. Can I see your code.

On Wed, Jul 15, 2015 at 11:57 AM, Noor Faizur Reza <notifications@github.com

wrote:

@mjhea0 https://github.com/mjhea0 , here is my errors (from the error
logs)-

I have three types of error.

At first- Error R10 (Boot timeout ) -> Web process failed to bind to $PORT
within 60 seconds of launch.
Heroku R10 Error-
https://devcenter.heroku.com/articles/error-codes#r10-boot-timeout

After that, i have a H20 error- desc="App crashed" method=GET
path="/favicon.ico" host=.... request_id=... fwd=....
dyno=connect=service=status=503 bytes= (blank)
Heroku H20 error-
https://devcenter.heroku.com/articles/error-codes#h20-app-boot-timeout

Then, i have a H10 error-- desc="App crashed" method=GET
path="/favicon.ico" host=.... request_id=... fwd=....
dyno=connect=service=status=503 bytes= (blank)
Heroku H10 error-
https://devcenter.heroku.com/articles/error-codes#h10-app-crashed


Reply to this email directly or view it on GitHub
#14 (comment)
.

@ni8mr
Copy link

ni8mr commented Jul 16, 2015

Hello, i have cloned the exact code from Github and than tried it on
Herkou. I have attached my code with this mail.

My app link: ni8mr2.herokuapp.com

On Thu, Jul 16, 2015 at 8:08 PM, Michael Herman notifications@github.com
wrote:

Your procfile is not correct. Can I see your code.

On Wed, Jul 15, 2015 at 11:57 AM, Noor Faizur Reza <
notifications@github.com

wrote:

@mjhea0 https://github.com/mjhea0 , here is my errors (from the error
logs)-

I have three types of error.

At first- Error R10 (Boot timeout ) -> Web process failed to bind to
$PORT
within 60 seconds of launch.
Heroku R10 Error-
https://devcenter.heroku.com/articles/error-codes#r10-boot-timeout

After that, i have a H20 error- desc="App crashed" method=GET
path="/favicon.ico" host=.... request_id=... fwd=....
dyno=connect=service=status=503 bytes= (blank)
Heroku H20 error-
https://devcenter.heroku.com/articles/error-codes#h20-app-boot-timeout

Then, i have a H10 error-- desc="App crashed" method=GET
path="/favicon.ico" host=.... request_id=... fwd=....
dyno=connect=service=status=503 bytes= (blank)
Heroku H10 error-
https://devcenter.heroku.com/articles/error-codes#h10-app-crashed


Reply to this email directly or view it on GitHub
<
#14 (comment)

.


Reply to this email directly or view it on GitHub
#14 (comment)
.

@mjhea0
Copy link
Collaborator

mjhea0 commented Aug 31, 2015

@ni8mr - is this still an issue?

@ni8mr
Copy link

ni8mr commented Aug 31, 2015

@mjhea0 , I didn't try it later. So this is not an issue for me now.

@mjhea0
Copy link
Collaborator

mjhea0 commented Aug 31, 2015

any chance that you could test it again?

@ni8mr
Copy link

ni8mr commented Sep 1, 2015

@mjhea0 , sorry for late reply. I have tried deploying it just now. Error (Application Error) remains. So i think it is still an issue.

@rlynjb
Copy link

rlynjb commented Oct 23, 2015

having the same issue guys.. was there any solution for this?

@ubeliciousgrace
Copy link

I'd be interested in knowing the solution for this. I build a node app, using reactJS. when i deployed to Heroku, i got the similar issue. I think it has to do with the asset thing. Can anyone explain me how to solve this problem?

@marcosicp
Copy link

any news?

@mjhea0 mjhea0 closed this as completed in #15 Mar 1, 2016
@mjhea0
Copy link
Collaborator

mjhea0 commented Mar 1, 2016

@marcosicp try now. Procfile has been updated.

@taysvea
Copy link

taysvea commented Aug 1, 2016

Please help I have the Procfile in my repo but I am still getting the H10 error. I have no idea why.

@taysvea
Copy link

taysvea commented Aug 1, 2016

@mjhea0
Copy link
Collaborator

mjhea0 commented Aug 1, 2016

I need to see your code. Post a link please.

@taysvea
Copy link

taysvea commented Aug 1, 2016

@mjhea0
Copy link
Collaborator

mjhea0 commented Aug 2, 2016

At the very least I need to know how to get this app running locally:

  • Which version of Python?
  • What's the name of the database that I need to create?
  • Can you add a file for me to recreate the tables?

When asking for help, you need to make it easy for one to help you. It will take me up to an hour to figure out how to get this running locally - which is not even the issue for you. Update the readme, then reply here.

@dulajsan
Copy link

dulajsan commented May 1, 2017

still having same problem. restarting heroku doesn't solve the problem.

@miPlodder
Copy link

In the Procfile,

Add correct name of the main routing file, here <main-routing-python>

web: gunicorn <main-routing-python>:app

@celikmustafa89
Copy link

THIS SOLUTION IS FOR GO
When you deploy an app through heroku, it does not allow you to specify the port number.
In other words, you can not specify your web service's port number as 8000 or something else, heroku decides the port number in runtime.
so, you can not use the following code:

    log.Fatal(http.ListenAndServe(":8000", router))

What you can do is, getting the runtime port of heroku.
In short, just use the following code:

    log.Fatal(http.ListenAndServe(":" + os.Getenv("PORT"), router))

@jacobsteenhuysen
Copy link

where? in Procfile?

@vialyx
Copy link

vialyx commented Sep 25, 2018

@celikmustafa89 Thank you! It works!

@PraveenAsh
Copy link

Set the PORT numbers dynamically rather than a hardcoded value

The issue is Heroku will provide a port number for your app. But if you have hardcoded the port numbers in your code then there will conflict b/w assigned and usage port. So, if it is running on another port, if you fetching file(ie favicon or '/') from another port it crashes with an error of H10.

FIX:
If in node.js try process.env.PORT which fetches the assigned port number.
For flask, python : port = int(os.environ.get('PORT', 5000))
This dynamically fetches port number and sets it. If not uses 5000. Solved the problem for me. If not there could be another issue but typically this is the fix.

Other possible error

The Heroku app need gunicorn to interface with your app. So, create a Profile without any extension and add the code as @nop33 has mentioned on the thread. Be sure to double check the name of your app and name mentioned in the Procfile. Because the Procfile gives Heroku the information to run your app

@max-quirk
Copy link

@PraveenAsh I'm having the same problem with a flask app. Where am I supposed to add that python code you mentioned? In my app.py file? If so, where exactly in the app.py file? Thanks

@RaghunathVadlakonda
Copy link

I'd be interested in knowing the solution for this. I build a node/Express app, using reactJS. when I deployed to Heroku, I got a similar issue. Can anyone explain to me how to solve this problem?
screenshot 2019-03-04 at 1 11 37 pm

@VikrantAgrahari
Copy link

In my case the problem was in the procfile.
My project use multiple file strutucture so the procfile archive need to be like this "web: gunicorn Site:'create_app()". "Site" is the project folder and "create_app" is the function in init.py.

Hope it helps :)

What create_app() function do in init.py?

@Pladque
Copy link

Pladque commented Apr 24, 2020

I had same problem, and fixed it
I did exacly like he said here:
https://youtu.be/kBwhtEIXGII?t=535
problem were in Procfile

@Herant
Copy link

Herant commented May 4, 2020

I had same problem, and fixed it
I did exacly like he said here:
https://youtu.be/kBwhtEIXGII?t=535
problem were in Procfile

That video shows bunch of other stuff.. that is far from "only" having issue in Procfile

@Pladque
Copy link

Pladque commented May 4, 2020

That video shows bunch of other stuff.. that is far from "only" having issue in Procfile
.
I share yt link with time (535 sec if it doest work) and I created Procfile step by step as a man on video said. Maby ur problem is in something else. I only shared my solution.

@Ameerpappay
Copy link

still facing this issue?
any solutions?

@salhi197
Copy link

image
having the same issue ! any solution ?

@victoriateo
Copy link

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.

@Pladque
Copy link

Pladque commented Jun 14, 2020

image
having the same issue ! any solution ?

Have u tried my solution?

@devcoder007
Copy link

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 -

@IshanSethi9
Copy link

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.

@Pladque
Copy link

Pladque commented Aug 17, 2020

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?

@IshanSethi9
Copy link

IshanSethi9 commented Aug 17, 2020

https://github.com/IshanSethi9/Musical-instruments
Please Check the repo here.

@Pladque
Copy link

Pladque commented Aug 17, 2020

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.

@IshanSethi9
Copy link

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

@IshanSethi9
Copy link

IshanSethi9 commented Aug 17, 2020

image
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.

@bawantha
Copy link

bawantha commented Oct 4, 2020

SAME

@bawantha
Copy link

bawantha commented Oct 4, 2020

image
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

@salhi197
Copy link

salhi197 commented Oct 4, 2020 via email

@MarounMaroun
Copy link

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:

  • Run python --version to find your local version
  • Create a runtime.txt file in the project's root folder, and add python-x.y.z (depending on your version)
  • Push changes

@kalpthakkar
Copy link

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

kacasey8 added a commit to kacasey8/option_wheel_tracker that referenced this issue Dec 31, 2020
@AdarshPan
Copy link

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 "
", line 994, in _gcd_import
2021-01-11T15:02:05.933861+00:00 app[web.1]: File "
", line 971, in _find_and_load
2021-01-11T15:02:05.933861+00:00 app[web.1]: File "
", line 941, in _find_and_load_unlocked
2021-01-11T15:02:05.933862+00:00 app[web.1]: File "
", line 219, in _call_with_frames_removed
2021-01-11T15:02:05.933862+00:00 app[web.1]: File "
", line 994, in _gcd_import
2021-01-11T15:02:05.933863+00:00 app[web.1]: File "
", line 971, in _find_and_load
2021-01-11T15:02:05.933863+00:00 app[web.1]: File "
", line 953, in _find_and_load_unlocked
2021-01-11T15:02:05.933913+00:00 app[web.1]: ModuleNotFoundError: No module name
d 'HealTech'
2021-01-11T15:02:05.941551+00:00 app[web.1]: [2021-01-11 15:02:05 +0000] [10] [I
NFO] Worker exiting (pid: 10)
2021-01-11T15:02:06.156671+00:00 app[web.1]: [2021-01-11 15:02:06 +0000] [4] [IN
FO] Shutting down: Master
2021-01-11T15:02:06.157400+00:00 app[web.1]: [2021-01-11 15:02:06 +0000] [4] [IN
FO] Reason: Worker failed to boot.
2021-01-11T15:02:06.354673+00:00 heroku[web.1]: Process exited with status 3
2021-01-11T15:02:06.404737+00:00 heroku[web.1]: State changed from up to crashed

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 "
", line 994, in _gcd_import
2021-01-11T15:02:54.234055+00:00 app[web.1]: File "
", line 971, in _find_and_load
2021-01-11T15:02:54.234055+00:00 app[web.1]: File "
", line 941, in _find_and_load_unlocked
2021-01-11T15:02:54.234056+00:00 app[web.1]: File "
", line 219, in _call_with_frames_removed
2021-01-11T15:02:54.234056+00:00 app[web.1]: File "
", line 994, in _gcd_import
2021-01-11T15:02:54.234056+00:00 app[web.1]: File "
", line 971, in _find_and_load
2021-01-11T15:02:54.234057+00:00 app[web.1]: File "
", line 953, in _find_and_load_unlocked
2021-01-11T15:02:54.236531+00:00 app[web.1]: ModuleNotFoundError: No module name
d 'HealTech'
2021-01-11T15:02:54.236949+00:00 app[web.1]: [2021-01-11 15:02:54 +0000] [10] [I
NFO] Worker exiting (pid: 10)
2021-01-11T15:02:54.298315+00:00 app[web.1]: [2021-01-11 15:02:54 +0000] [11] [I
NFO] Booting worker with pid: 11
2021-01-11T15:02:54.308096+00:00 app[web.1]: [2021-01-11 15:02:54 +0000] [11] [E
RROR] Exception in worker process
2021-01-11T15:02:54.308099+00:00 app[web.1]: Traceback (most recent call last):
2021-01-11T15:02:54.308100+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.308100+00:00 app[web.1]: worker.init_process()
2021-01-11T15:02:54.308101+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.308101+00:00 app[web.1]: self.load_wsgi()
2021-01-11T15:02:54.308102+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.308102+00:00 app[web.1]: self.wsgi = self.app.wsgi()
2021-01-11T15:02:54.308103+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.308103+00:00 app[web.1]: self.callable = self.load()
2021-01-11T15:02:54.308104+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.308104+00:00 app[web.1]: return self.load_wsgiapp()
2021-01-11T15:02:54.308105+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.308105+00:00 app[web.1]: return util.import_app(self.app_uri
)
2021-01-11T15:02:54.308105+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.308106+00:00 app[web.1]: mod = importlib.import_module(modul
e)
2021-01-11T15:02:54.308106+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.308106+00:00 app[web.1]: return _bootstrap._gcd_import(name[
level:], package, level)
2021-01-11T15:02:54.308107+00:00 app[web.1]: File "
", line 994, in _gcd_import
2021-01-11T15:02:54.308107+00:00 app[web.1]: File "
", line 971, in _find_and_load
2021-01-11T15:02:54.308108+00:00 app[web.1]: File "
", line 941, in _find_and_load_unlocked
2021-01-11T15:02:54.308108+00:00 app[web.1]: File "
", line 219, in _call_with_frames_removed
2021-01-11T15:02:54.308108+00:00 app[web.1]: File "
", line 994, in _gcd_import
2021-01-11T15:02:54.308109+00:00 app[web.1]: File "
", line 971, in _find_and_load
2021-01-11T15:02:54.308109+00:00 app[web.1]: File "
", line 953, in _find_and_load_unlocked
2021-01-11T15:02:54.308117+00:00 app[web.1]: ModuleNotFoundError: No module name
d 'HealTech'
2021-01-11T15:02:54.308851+00:00 app[web.1]: [2021-01-11 15:02:54 +0000] [11] [I
NFO] Worker exiting (pid: 11)
2021-01-11T15:02:54.469000+00:00 app[web.1]: [2021-01-11 15:02:54 +0000] [4] [IN
FO] Shutting down: Master
2021-01-11T15:02:54.469216+00:00 app[web.1]: [2021-01-11 15:02:54 +0000] [4] [IN
FO] Reason: Worker failed to boot.
2021-01-11T15:02:54.621000+00:00 heroku[web.1]: Process exited with status 3
2021-01-11T15:02:54.699115+00:00 heroku[web.1]: State changed from starting to c
rashed
2021-01-11T15:02:59.805850+00:00 heroku[router]: at=error code=H10 desc="App cra
shed" method=GET path="/" host=healtech.herokuapp.com request_id=6d60bf79-9e4d-4
786-9ae7-054c3aef4473 fwd="157.40.20.59" dyno= connect= service= status=503 byte
s= protocol=https
2021-01-11T15:03:01.374208+00:00 heroku[router]: at=error code=H10 desc="App cra
shed" method=GET path="/favicon.ico" host=healtech.herokuapp.com request_id=84f9
9215-a069-4666-a403-0481d927b106 fwd="157.40.20.59" dyno= connect= service= stat
us=503 bytes= protocol=https

@IrfanDarood
Copy link

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!

@felip3costa
Copy link

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.

@manelalayet19
Copy link

i'm having the same problem, i tried everything
my Procfile is web: gunicorn index:server --preload --timeout300

@FartPrincess69
Copy link

I'm having the same issue, I tried all the suggestions in this thread and more from googling the error, but nothing worked :(

@matias-cavalcante
Copy link

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.

@manelalayet19
Copy link

manelalayet19 commented Nov 13, 2021 via email

@opeeyum
Copy link

opeeyum commented Mar 23, 2022

Make sure you not uploading the virtual environment directory in the remote repo.

@GaryHDSL
Copy link

GaryHDSL commented Sep 1, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.