I'm getting 'Application failed to respond' but no error shows up in my logs, how should I debug?
The application works locally. Deploy log says successfully built.
20 Replies
please give this a read https://docs.railway.app/troubleshoot/fixing-common-errors
I'm using hypercorn and am running hypercorn main:app --reload in my terminal
This is what shows up on my terminal: INFO:hypercorn.error:Running on http://127.0.0.1:8000 (CTRL + C to quit)
use
hypercorn main:app --bind [::]:$PORT
as your start command for railwayI ran this and it worked: hypercorn main:app --bind 0.0.0.0:8000
but my application is still failing to respond
Your command as fails like this:
in <module>
sys.exit(main())
^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/hypercorn/main.py", line 287, in main
run(config)
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/hypercorn/run.py", line 38, in run
sockets = config.create_sockets()
^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/hypercorn/config.py", line 203, in create_sockets
insecure_sockets = self._create_sockets(self.bind)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/hypercorn/config.py", line 266, in _create_sockets
sock.bind(binding)
socket.gaierror: [Errno 8] nodename nor servname provided, or not known
please take my advice, I've done this many hundreds of times
how are you settling my start command
Hmm not sure what I mean
are there things I need to do before running your command to set it up?
Also the application works until I push a json + .py file to the application
maybe that's the cause?
you don't run the command, you use that as the start command for your service
Oh
I assume you have a Procfile?
I do not
how are you currently settling your hypercorn start command on railway?
I'm not sure what that means...
So I just create Profile with your command in it and push?
Procfile
I need to know how you are currently telling railway to run the start command you showed me
I was just running it in terminal
we are talking about railway here, local doesn't apply
please send me both your build and deploy logs https://bookmarklets.up.railway.app/log-downloader/
My deploy log: [2023-11-16 07:47:55 +0000] [11] [INFO] Running on http://[::]:6639 (CTRL + C to quit)
use the bookmarklet please
Sorry, I looked it up and it's unsafe to use
Do you mind if I just send you the logs?
the source code is available for you to verify
if it was unsafe Railway would have taken it down long ago
That's true, but I'm a newbie and don't have the judgement for it yet :/ sorry about that
Adding a procfile worked for me! Thanks so much for the help