I am trying to host FASTAPI apis on Heroku, but I keep facing this error
at=error code=H14 desc="No web processes running" method=GET path="/" host=myapp-api.herokuapp.com request_id=09d8bd62-bcf7-4738-a747-fb3cdd8cd7f7 fwd="103.99.148.171" dyno= connect= service= status=503 bytes= protocol=https
heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/favicon.ico" host=myapp-api.herokuapp.com request_id=92d2cfd5-c0d8-4696-9e79-8f0bb7231bce fwd="103.99.148.171" dyno= connect= service= status=503 bytes= protocol=https
After referring all the similar post ,
like this one
I found that
heroku ps:scale web=1
could work , but my issue is
There is no mention of where to run this command.
Should this be added it to my proctfile ?
I tried running it in the Heroku
Run Console
on the web. but it returnedbash: heroku: command not found
Since Gunicorn ( Required by Fastapi ) is not supported in windows, and thus I am also unable to do
heroku run local
My proctfile looks like this
web: gunicorn -w 4 -k uvicorn.workers.UvicornWorker main:app -p $PORT
My full error log
2022-07-21T08:53:20.000000+00:00 app[api]: Build succeeded
2022-07-21T08:53:26.112645+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/" host=myapp-api.herokuapp.com request_id=9efd5f28-4aa3-4aac-91b0-bc89b8da1d1b fwd="103.99.148.171" dyno= connect= service= status=503 bytes= protocol=https
2022-07-21T08:53:26.949447+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/favicon.ico" host=myapp-api.herokuapp.com request_id=b03f8ca4-63e3-48c7-9349-2339fa0a4dc7 fwd="103.99.148.171" dyno= connect= service= status=503 bytes= protocol=https
2022-07-21T08:54:12.000000+00:00 app[api]: Build started by user dummyuserid
2022-07-21T08:54:35.485193+00:00 app[api]: Release v14 created by user dummyuserid
2022-07-21T08:54:35.485193+00:00 app[api]: Deploy 6d456f91 by user dummyuserid
2022-07-21T08:54:37.460184+00:00 heroku[worker.1]: State changed from crashed to down
2022-07-21T08:54:45.000000+00:00 app[api]: Build succeeded
2022-07-21T08:55:08.908036+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/" host=myapp-api.herokuapp.com request_id=5f961c83-9dfd-4346-9511-420cbd0bee6e fwd="103.99.148.171" dyno= connect= service= status=503 bytes= protocol=https
2022-07-21T08:55:09.686828+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/favicon.ico" host=myapp-api.herokuapp.com request_id=062ef29f-c702-4963-8eb6-4ec09a9c1d7d fwd="103.99.148.171" dyno= connect= service= status=503 bytes= protocol=https