I need help Build error constantly occurs when i want to deploy my django app
Project id : 08f5670b-7f06-4fa9-9f77-c30234095737
40 Replies
Project ID:
08f5670b-7f06-4fa9-9f77-c30234095737
build logs please https://bookmarklets.up.railway.app/log-downloader/
The build logs
what version of python are you using locally?
3.11.3
add a
runtime.txt
file to your project with 3.11.3
in itIn the project's root folder?
if thats what you have railway set to, yes
ok
the same error still occurs
build logs again please
this is a completely different error
send your requirements.txt file please
are you using
twisted-iocpsupport
in your code?No i don't think so
then please remove all packages you arent using from your requirements.txt
alright
The deployment was succesfull thanks alot
no problem!!
Hello again. How do i configure my project to use asgi rather than wsgi because my project is asyncronous
how would you do that locally?
you tell me how you'd do it locally, I'll tell you how you'd do it on railway
i just add ASGI_APPLICATION in my settings.py file and i use daphne server
alright, gonna need more information than that though, what daphne command would you run to start your app
the normal python manage.py runserver and it automatically uses the daphne server
I don't believe that's what you'd do in a production environment though
runserver is purely for development use
please provide a daphne command that would start your app
daphne Habii.asgi:application
that looks good, do you have daphne in your requirements.txt file?
yeah
do you have a Procfile?
yeah
please send the contents of that file
web: gunicorn Habii.wsgi
okay one sec, I'll get you the new daphne command to replace that with
web: daphne Habii.asgi:application --bind 0.0.0.0 --port $PORT
give that a try and let me know how it goesalright
quick question, have you confirmed that running your application locally with daphne (not runserver) works as intended?
let me check
It doesnot run as intended locally
you can't make concurrent requests?
the server refuses to run it outputs some errors
must have given me an incorrect start command, what issues do you run into with gunicorn
The command is correct it is from django docs but the error is clearly from my end since the server doesn't even run locally
ah okay, makes sense