R
Railway

✋|help

Django channels not working on the production environment

Kkane5/24/2023
I recently deployed a websocket chat app that I developed with Django channels. It works perfectly fine on my local computer even without Daphne web server, but it does not work on production. I followed the docs and installed Daphne, added the configuration on my ProcFile and it still does not work, all I get is a 404 error on every websocket request when I debug. I noticed that my app is still being served with Gunicorn instead of Daphne. Please what am I not doing correctly? Javascript console error: WebSocket connection to 'wss://sitename.up.railway.app/ws/api/chats/create/?token=750e80203245ee5db475006b6229ca391f836f0f12983939330237' failed: Project ID: 4713c1f6-1710-4e59-bfc6-2aaa0aaea3e0 ProcFile Configuration: web: daphne accountGig.asgi:application --port $PORT --bind 0.0.0.0 -v2 Packages : channels==3.0.4 channels-redis==4.1.0 daphne==3.0.2 Django==4.0.3 gunicorn==20.1.0
BBrody5/24/2023
do you have a repo please?
Kkane5/24/2023
yes i have a private repository
BBrody5/24/2023
okay screenshot of the repos files please?
Kkane5/24/2023
here it is
BBrody5/24/2023
I see the issue, but first, what is the file named railway for?
Kkane5/24/2023
It is autogenerated I didn’t put that there Please where am I wrong ?
BBrody5/24/2023
ProcFile --> Procfile wrong letter casing
Kkane5/24/2023
Oh 🤦🏽‍♂️ I’d change that now and try again : )
BBrody5/24/2023
small nit pick, you have gunicorn in your requirements but are using daphne, you could remove gunicorn right? the less dependencies the faster the build 🙂
Kkane5/25/2023
Thank you very much I renamed procfile and it worked 🫡 definitely I’d be removing gunicorn now, Although daphne is very slow don’t know how to fasten it 🥲

Looking for more? Join the community!

Want results from more Discord servers?
Add your server
Recommended Posts
Postgres connection terminated unexpectedlyHi, I have a simple express server using typescript with prisma. I have a postgres database hosted oAPI limitationsDoes Railway have an API call limit per service in the free account? I am running a cron job that inPERN Application with React Router -- WebSocket connection to 'xxx' failed:I read a previous thread where it was suggested to use serve when running the client in production mCustom domain not availableHi everyone. I had 3 different projects in my account and had 2 different environments. But I deciddeployment crashed and didn’t restart?I had my settings on always restart, but it didn’t just now, just sat crashedGoDaddy / CloudFlareim having many issues with godday, my site is working but in rail dont the green check and i want toHow can i access Ghost shell?So i am making some changes on the configurations: which is basically changing it to my language - bIssue with Railway CLI auth (404)Hey ! When I run `railway login` or `railway whoami` I get this error (freshly installed, internet Memory ProblemI am running into a memory error when I try to use the app with my full array of JSON data. My JSON server errorPlease me app is failed and I can´t view the logs for know why.App not buildingI have an python app for a discord bot. This is my second one on railway actually the first one is flutter webhi i want to deploy flutter web on railway anyone how to do this ?Restart doesn't actually restartSeems like a service failed after it couldn't connect to a DB... i tried to restart but it never resDeployment fails on productionMy deployments builds started failing without any change. 6 hours ago my deployments started to faUse "pnpm install" for installation in this project.I´m getting this error , how can i solve it?my code is still running even tho the deploy is stoppedeManual deploymentIs it possible to select a GitHub branch and manually begin a deploy? Or do all deploys always have Error 401 while browsing the pages, while calling the backend worksHi there, I’m having an issue trying to get the angular frontend part to work. I’ve deployed it withCan you deploy Angular apps to railway?I'd like my backend and frontend deployed in one place if possible, so I'm just wondering if AngularWrong billing methodOn the page: https://railway.app/account/usage The Bill Breakdown billing is written backwards in th