Questions tagged [daphne]

Daphne is a HTTP, HTTP2 and WebSocket protocol server for ASGI, and developed to power Django Channels.

259 questions
1
vote
1 answer

Getting AttributeError: 'ASGIRequest' object has no attribute 'get' in daphne django

I'm trying to run my fastapi code on daphne webserver instead of uvicorn, because my end goal is to run it on Android, where uvicorn is not available. I've been debugging my app for hours at this point. Setting it all up. Here is my…
Petr L.
  • 414
  • 5
  • 13
1
vote
0 answers

Daphne does not find *server* on production server

I am trying to use django-eventstream to implement SSE events. My code runs perfectly using manage.py runserver on the local PC. However, when I run: daphne config.asgi:application on the production server, I get the following error: File…
Psionman
  • 3,084
  • 1
  • 32
  • 65
1
vote
1 answer

Unable to implement websocket with Nginix and Daphne

I am trying to setup websockets on my django application using Daphne and Ngnix. On my local setup everything works as expected but when I have uploaded to the server the websockets do not respond. This is Nginx.conf file: user…
Shiny
  • 115
  • 1
  • 9
1
vote
1 answer

Daphne not accepting websocket connections

I am trying to use daphne in django project to handle the websocket connections. I have installed daphne and it seems to be running. However, I am unable to send any websocket connection request. This is my daphne.service…
Shiny
  • 115
  • 1
  • 9
1
vote
1 answer

Websocket Connection Failed on AWS EC2 Ubuntu Instance(Django Channels)

I am trying to deploy my django chammels asgi app in ubuntu aws ec2 instance, my wsgi app is working fine also the asgi on ubuntu is working fine (tested with python websocket library) there is no error in code and daphne is running perfectly I…
1
vote
0 answers

NGINX-WSS connection failing but WS connection works

I am having trouble implementing wss connections in my app over port 443. When connecting to my app over port 80 I able to connect to the socket(ws connection). my app works fine with HTTPS requests(can log in and request data) but cannot handle wss…
Darius
  • 69
  • 9
1
vote
1 answer

How to solve websocket ping timeout issue

I have Django Channels (with Redis) served by Daphne, running behind Nginx ingress controller, proxying behind a LB, all setup in Kubernetes. The Websocket is upgraded and everything runs fine... for a few minutes. After between 5-15min (varies), my…
mrj
  • 589
  • 1
  • 7
  • 17
1
vote
2 answers

Run Django in DEBUG mode with Daphne

Need help to run django app with daphne in DEBUG mode with pycharm. Is there any way?
Arthur
  • 109
  • 8
1
vote
1 answer

Deploying django channels on heroku

I have created a standard django application with startproject, startapp, etc. and I want to deploy it on heroku. When I was using gunicorn I solved the directory issue like so: web: gunicorn --pythonpath enigma enigma.wsgi with the --pythonpath…
hhaefliger
  • 521
  • 3
  • 18
1
vote
0 answers

Django/Daphne, got NotImplementedError calling asyncio.create_subprocess_exec( under WINDOWS

I am using Django 3.2 with Daphne 3.0.2, Python 3.8.9 under Windows 10. Trying to call proc = await asyncio.create_subprocess_exec( python_exe, bridge_script, stdin=asyncio.subprocess.PIPE, …
sirpatrick
  • 11
  • 2
1
vote
1 answer

Is multiplexing websocket connections an important optimization in Django Channels >= 2?

I maintain a Django Channels v1 app with six Consumers multiplexed over one WebSocket connection. I'm upgrading to Django Channels v2, where connection (de)multiplexing is no longer supported; see GitHub Issue #825 - (Re)Implement Multiplexing. If I…
Myer
  • 3,670
  • 2
  • 39
  • 51
1
vote
1 answer

Messages not getting to consumer unless Heroku dyno count is scaled way up

We have built a front-end with React and a back-end with Django Rest Frameworks and channels. We are using Heroku Redis as our Redis provider. Our users connect to Channels via a ReconnectingWebSocket. We are using Python 3.6 and Channels 2.4 The…
JayBee
  • 540
  • 1
  • 5
  • 22
1
vote
0 answers

Websocket/REST API - which of them for a large request scenario?

I know that they are two different things and technical approaches, but consider this scenario: i have a third party application that will interface with my own application and every 5 minutes has to push to my services a large JSON (about…
Symon
  • 673
  • 6
  • 25
1
vote
1 answer

Django channels websocket connecting and disconnecting (Nginx + Daphne + Django + Channels)

I'm having problems to deploy this in a production virtual machine, with Nginx + Gunicorn + Daphne + Django. I had been testing it in a local virtual machine, and it works without a problem, but in production, the sockets is connecting and…
1
vote
1 answer

Unable to located Package Daphne

I'm deploying a django app including django channels using nginx, gunicorn and daphne. But when i install daphne with sudo apt install daphne, it gives E: unable to locate package daphne. What Should I do?
user13658830