Closed madhanrajan closed 9 months ago
wsgi
@madhanrajan can you provide more details on the error, like how you launch granian and stacktrace/logs?
I run it with this command in the Procfile web: granian --interface wsgi project.asgi:application
I encountered an error indicating that the server listened to the port but timed out
@madhanrajan there's something wrong in your command, as you specified WSGI protocol but pointed granian to the ASGI interface.
sorry, I did use wsgi but it still didn't work. Could you try replicating this on a heroku instance?
@madhanrajan no, I'm sorry, I don't have any quick way to replicate this on Heroku. If you can provide at least some logs we can try to better understand what's happening.
@madhanrajan - have you tried setting the host to 0.0.0.0 instead of 127.0.0.1
@madhanrajan it is very brutal to fill in an issue without an error. Especially when the error is very clear:
Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
Heroku assigns a random port to $PORT
and needs to be bind to the outside world. I tested it with the following command and it works as intentend.
granian --interface wsgi --port $PORT --host 0.0.0.0 server:app
Do you run Django in ASGI or WSGI?