2 months ago
Django ASGI app deploys successfully but is completely inaccessible - all URLs return "Application failed to respond"
Setup:
- Django 5.1.3 + DRF with ASGI (Gunicorn + Uvicorn workers)
- Pre-deploy: python manage.py migrate --noinput
- Start command: python manage.py collectstatic --noinput && gunicorn backend.asgi:application -k uvicorn.workers.UvicornWorker -w 2 --bind [::]:$PORT
What's Working:
-
App builds and deploys without errors
-
Gunicorn starts correctly on the assigned port (PORT is: 8080)
-
Workers boot successfully
-
No error logs or crashes
What's NOT Working:
-
All HTTP requests return "Application failed to respond"
-
No incoming request logs in Gunicorn (suggests requests aren't reaching the app)
-
Service stops instantly and gives the following error:
6 Replies
2 months ago
Hey there! We've found the following might help you get unblocked faster:
If you find the answer from one of these, please let us know by solving the thread!
2 months ago
Looks like your container stopped.
⠀
Can you share what the metrics tab shows? Is it possible you're hitting an out of memory error?
Additionally it would be great if you could share the repository if it is open source.
samgordon
Looks like your container stopped.⠀Can you share what the metrics tab shows? Is it possible you're hitting an out of memory error?Additionally it would be great if you could share the repository if it is open source.
2 months ago
Sadly repository is not open source but i can share snippets if it helps.
Also metrics are these:
I dont think it is a metrics issue since the container instantly stops
Attachments
2 months ago
I am a bit curious if this is a ipv6 binding vs ipv4.
Can you change the bind command from :: to 0.0.0.0
2 months ago
This is resolved, the issue was actually a catch all route I had in Django, and the railway couldn't actually show anything on the server
Status changed to Solved brody • about 2 months ago
noahd
I am a bit curious if this is a ipv6 binding vs ipv4.Can you change the bind command from :: to 0.0.0.0
2 months ago
For future reference, Gunicorn will dual stack bind when binding to [::]
Status changed to Awaiting User Response Railway • about 2 months ago
a month ago
This thread has been marked as solved automatically due to a lack of recent activity. Please re-open this thread or create a new one if you require further assistance. Thank you!
Status changed to Solved Railway • about 2 months ago