Daphne is a HTTP, HTTP2 and WebSocket protocol server for ASGI, and developed to power Django Channels.
Questions tagged [daphne]
259 questions
0
votes
0 answers
Websocket connection issue on django production server
I am facing an issue with the WebSocket protocol. I am using Django channels/daphne. Everything is working normally on the development local server. I think the issue is with NGINX settings. The error code is 1006
Here is the reverse proxy that I am…

itsmehemant7
- 339
- 1
- 8
0
votes
0 answers
how to run tasks in parallel with django async
i'm using daphne as a asgi server, with django. turning my view from sync to async was relatively simple, since i could use @sync_to_async at the ORM part. the problem is, some service of mine is like this:
async def service_of_mine(p1, p2, p3):
…

rado
- 5,720
- 5
- 29
- 51
0
votes
1 answer
Deploy django channels to dcoker and use nginx has a proxy server
Im trying to deploy django channels using docker, and im using the daphne protocol to serve the application. when i run that its starts successfully but i'm unable to connect with the websocket.
i can connect with the application in other routes but…

Rotxa
- 1
- 1
- 2
0
votes
1 answer
Run Daphne in production on (or forwarded to?) port 443
I am trying to build a speech recognition-based application. It runs on Django with Django-channels and Daphne, and Nginx as the web server, on an Ubuntu EC2 instance on AWS. It should run in the browser, so I am using WebRTC to get the audio stream…

felixjrd
- 65
- 2
- 10
0
votes
0 answers
How to divide Daphne requests on mutiple processors?
I use a Daphne server for my ASGI Django application. When I run htop on my Ubuntu server it shows all the load on only one processor and the app gets slow, so I'd like to know what is the easiest way to speed up my server. App is inside a Docker…

MijatTomić
- 61
- 8
0
votes
0 answers
how to split requests between uwsgi and asgi servers with nginx
i had this configuration:
upstream my_custom_upstream {
server container-1:8000 weight=99;
server container-2:8001 weight=1;
}
location = /my_url {
uwsgi_pass my_custom_upstream;
...
}
now i'm changing only container-2 to run on…

rado
- 5,720
- 5
- 29
- 51
0
votes
0 answers
Nginx 502 gateway error with AWS RDS Aurora, Django, and Daphne
I am trying to run an open source cloud project described here. I want to use an AWS RDS Aurora instance, instead of the project's default database, so I followed their instructions to do that here.
However, when I reload the server:
bash…

Michael Hsieh
- 67
- 8
0
votes
0 answers
how to setup daphne with nginx with djnago channels for websockets
I have to set up the Django server with WebSockets and HTTP requests. It works fine in my local system. and also on the server without SSL, but when we use the SSL on the server the HTTP request works fine on the https but WebSocket does not work…

swapnil gautam
- 319
- 2
- 9
0
votes
1 answer
Why do I get errors when starting Daphne for prod / IIS?
I'm using Django eventstream for SSE and Channels (I'm not able to use Memurai or Redis). When I run the local server, everything works great. The user can submit a file, that information is ran against the external 3rd party API it calls, and real…

ky922
- 51
- 7
0
votes
1 answer
How to request to Gunicorn and respond with Daphne? Using Django channels, Nginx, Gunicorn, Daphne
I'm facing a strange issue in deploying Django app with Nginx, Daphne and Gunicorn.
As of now, I have successfully deployed my Django app.
My HTTP requests are handled by Gunicorn, and WSS requests are handled by Daphne, which is meant to…

Tushar Kulkarni
- 138
- 2
- 15
0
votes
1 answer
Why running curl command using parallel needs to timeout?
I have set up a daphne server with my Django application and I wanted to use the curl command to send parallel requests to the API that I have created. This is the command that I am using in a terminal.
seq 10 | parallel -j 5 --joblog pandu.log curl…

Aakash_Deep
- 35
- 6
0
votes
1 answer
WebSocket connection does not happen and connection request gets 400 error NGINX+Daphne+Django+Channels on Ubuntu AWS EC2
I followed tutorial for deploying websockets for Django-channels using Daphne and Nginx.
Here is what my NGINX.conf at etc/nginx/sites-enabled/ looks like
server {
listen 80;
server_name my_server_ip;
charset utf-8;
…

Code99
- 33
- 6
0
votes
1 answer
Django Channels and Accessing Models
I am running Django 3.2.10 and I am using Django Channels with daphne and gunicorn. I can get my websocket code to run and function without issue but when I go to access any of my django models I hit a snag. I'm doing something like this:
async def…

TheStranger
- 1
- 2
0
votes
1 answer
JavaScript console.error redirect to file in Daphne Django application
I am using systemd (on Debian) to launch a shell script (as me as a user):
startup.sh:
#/bin/bash
daphne -b '0.0.0.0' -p 8000 myProject.asgi:application 2> /tmp/log.out
In my Python (Django) application I need to output to stdout and have it show…

Hamid
- 90
- 1
- 7
0
votes
0 answers
How to implement SocketIO in Django ASGI
I tried this; https://github.com/ly3too/django-channels-with-socket.io But I keep getting 404 for the socket-io. Are there any other methods to implement the socket io?

A. Kruk
- 1
- 2