Questions tagged [daphne]

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

259 questions
8
votes
1 answer

How to configure Daphne proxy with Nginx and uwsgi

I have a Django application located in a server with Nginx and uwsgi configuration. And now I have to work with Django Channels too. In a local computer all it's fine but I have read a lot about that Django Channels is not compatible with uwsgi. I…
8
votes
1 answer

Using Daphne behind nginx

I have a Django app that used uWSGI alongwith Nginx for production deployment. Now I am integrating Channels 2.0 and realised that Daphne is the substitute for uwsgi here. I am able to get Daphne to serve when running it in standalone mode, but when…
pr4n
  • 2,918
  • 3
  • 30
  • 42
8
votes
0 answers

How to send heartbeats / ping over django channels 1

We have Django Channels running with Daphne and redis. Before we had django-websocket-redis running and it supports a heartbeat (ping) message out of the box. Our client code depends on this heartbeat to confirm an active connection, but in django…
ThaJay
  • 1,758
  • 1
  • 19
  • 30
7
votes
2 answers

Daphne not logging errors

I have the following systemd config [Service] WorkingDirectory=/srv/www/project_a/project_a/ Environment=JSON_SETTINGS=/srv/www/project_a/project_a.json ExecStart=/srv/www/project_a/bin/daphne -b 0.0.0.0 -p 8000…
James Lin
  • 25,028
  • 36
  • 133
  • 233
7
votes
2 answers

Django + Daphne hot reload after code updates

I am running a Django restserver application served by Daphne and Nginx acting as reverse proxy. I also have a periodic cron job that pulls updated code from my git to the server. I am not able to find a way to do a hot reload and regenerate the…
DancingJohn
  • 557
  • 1
  • 9
  • 17
7
votes
3 answers

Running django channels with daphne on systemd

First of all, sorry for the long question, I hope a few of you have patience for this. TL; DR: How do I load django settings correctly in systemd? I am following this guide, Deploying Django Channels Using Daphne, so I can run some real-time apps…
jhc
  • 1,739
  • 3
  • 21
  • 46
6
votes
2 answers

What's the right procfile / requirements for heroku with django channels?

tl;dr - django channels app runs local with manage.py runserver but not on heroku. I'm new to django channels - trying to deploy a very basic django app using channels to heroku. I initially built the project using the standard django polls…
Krishna
  • 61
  • 1
  • 2
6
votes
2 answers

Websocket with Django channels doesn't work, connection failed

Hello Awesome People! I created a chat room with django-channels. Every time I try to connect to my chat room via web socket in production, it fails. Locally it works correctly. I host on digitalocean pip…
Eu Chi
  • 533
  • 1
  • 6
  • 22
6
votes
1 answer

Trouble getting started with Django Channels

I am creating my own application inspired from the Channels 2.0 tutorial. However, I am unable to establish WebSocket connection. Daphne complains for 404 saying the websocket URL can not be found. I am not sure where the error is. UPDATE: My Daphne…
pr4n
  • 2,918
  • 3
  • 30
  • 42
6
votes
1 answer

Deploying django app with channels on Daphne - SSL

I am trying to deploy a simple django app to receive websocket messages (wss). I am using the following command: daphne -e ssl:443:privateKey=key.pem:certKey=cert.cer bms_project.asgi:channel_layer with the following included in the settings.py…
PhilS
  • 245
  • 7
  • 16
6
votes
1 answer

Websocket timeout in Django Channels / Daphne

Short question version: what am I doing wrong in my Daphne config, or my Consumer code, or my client code? channels==1.1.8 daphne==1.3.0 Django==1.11.7 Details below: I am trying to keep a persistent Websocket connection open using Django Channels…
wmorrell
  • 4,988
  • 4
  • 27
  • 37
5
votes
2 answers

Error when deploying django web application with daphne: Requested setting INSTALLED_APPS, but settings are not configured

I have been battling with an error that I encountered when trying to deploy a django application that uses channels. Error in heroku logs Starting process with command `daphne friendship.asgi:application --port 52589 --bind 0.0.0.0…
Diegoa87
  • 169
  • 1
  • 1
  • 13
5
votes
3 answers

How to properly configure Django Channels in production using AWS, Docker, Nginx + Daphne?

We are attempting to configure a live-chat on our website, through the use of Django Channels 2, AWS, and Nginx + Daphne. Our setup works fine running locally, however we are running in to issues when deploying to production. Our production…
5
votes
1 answer

I keep getting NotImplementedError error when starting django server

Below is a full trace of the error. Please let me know what could fix this issue: (env) C:\Users\LENOVO\Desktop\SD\backend>python manage.py runserver Watching for file changes with StatReloader Exception in thread django-main-thread: …
Lakshmi
  • 61
  • 1
  • 2
5
votes
1 answer

Trouble with deploy django channels using Daphne and Nginx

I got a 502 error when I'm trying to open a website. I used the instructions from the official website link Added new file lifeline.conf at /etc/supervisor/conf.d/ lifeline.conf [fcgi-program:asgi] # TCP socket used by Nginx backend…
Jekson
  • 2,892
  • 8
  • 44
  • 79
1
2
3
17 18