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

Django can only handle ASGI/HTTP connections, not websocket

Hello I am getting a error. Before coming here, I tried many different ways and looked at the topics that were opened here before. But whatever I do, it keeps giving me errors. I tried daphne and uvicorn but the result is the same, it opens in local…
1
vote
1 answer

Why does my websocket keep disconnecting in Django Channels App?

I have been on this for a month now without a working solution. Everything works fine in production but I have been trying to deploy my django-channels application using nginx as reverse proxy, supervisor to keep servers running, gunicorn to serve…
1
vote
1 answer

Using WebSocket Secure with Nginx and Daphne

I've been struggling to figure it all out, but I finally have something working with the following: nginx: server { server_name example.com; location = /favicon.ico { access_log off; log_not_found off; } location /static/ { root…
theEpsilon
  • 1,800
  • 17
  • 30
1
vote
1 answer

Django channels - Client receives message sometimes and not other times till it doesn't recieve it at all

UPDATE I think the issue is with python version. On my localhost it worked fine when I had python 3.6. On production, where the issue appeared first, I have 3.8. After I changed my localhost python version to 3.8 I could see the same issue as was on…
Newbie
  • 343
  • 2
  • 13
1
vote
0 answers

Running Gunicorn alongside Daphne on Nginx

I have been following several different tutorials about how to set up gunicorn and daphne in parallel so that gunicorn can serve http to my django apps and daphne to my django channels app. However, I am now stuck on the welcome to nginx homepage…
zara30
  • 31
  • 2
1
vote
1 answer

django runserver works, but with daphne there's an error

I have a django website with channels for websockets that is working on my local machine. I can call python manage.py runserver and the site runs fine, the frontend websocket connection can send and receive from the backend server. However, when I…
1
vote
2 answers

How to run Daphne and Gunicorn At The Same Time?

I'm using django-channels therefore I need to use daphne but for the static files and other things I want to use gunicorn. I can start daphne alongside gunicorn but I can not start both of them at the same time. My question is should I start both of…
John
  • 45
  • 1
  • 7
1
vote
0 answers

configuring django channels for websockets in production

I have a page that has a .../chat/ url, and the whole thing works on localhost. I'm trying to deploy on ubuntu and having a hard time. I guess getting to the point looks like posting what I've got: /etc/nginx/sites-enabled/mysite: limit_req_zone…
ILoveCliques
  • 135
  • 1
  • 11
1
vote
1 answer

How to run pgBouncer in heroku.yml with daphne

So I built a chat app and deployed it with heroku. Since I'm on hobby-dev I can only have 20 connections to postgres, so following some suggestions online I decided using pgbouncer may be a good idea. The heroku document on setting the buildpack up…
Lucy Gu
  • 369
  • 1
  • 3
  • 10
1
vote
0 answers

502 Bad Gateway Nginx error while deploying Django Channels app using Daphne on Google App Engine (Flexible)

My Django app was working fine on Google App Engine (Flexible) using gunicorn as entrypoint in the app.yaml file. I needed to add websockets to it so I used Django Channels (with redis). This works beautifully on my local machine (Windows 10). For…
1
vote
0 answers

(Nginx+Daphne+Django) Error during WebSocket handshake: Unexpected response code: 404

I have an Django(3.0) app using Daphne as an app container and Nginx as proxy server. Daphne -u /home/ubuntu/virtualenvs/src/app/app.sock app.asgi:application My problem is that the websocket connection failed. (index):16 WebSocket connection…
user2869934
  • 1,419
  • 4
  • 13
  • 18
1
vote
1 answer

django channels vs daphene

I am little bit confused about the main roles of django-channels and uvicorn server. I have read a lot of blogs but did not get much clarification. If we can implement an ASGI server for websockets using channels, then why do we need asgi server…
gar
  • 389
  • 1
  • 3
  • 8
1
vote
2 answers

How to run daphne in localhost with https and mkcert

I am trying to run a django-channels project locally using https (the app has a facebook login that requires https). I have followed the instructions for generating a key and certificate using mkcert ( https://github.com/FiloSottile/mkcert ) and…
Jonathan Stevens
  • 307
  • 1
  • 3
  • 9
1
vote
0 answers

Error handling post request in Django and getting "Too long to shutdown and was killed"

I am running daphne server in production and getting following error Application instance wait_for=
hardik24
  • 1,008
  • 1
  • 11
  • 34
1
vote
3 answers

Django Channels Worker is returning TypeError: zadd() got an unexpected keyword argument 'daphne

In my server, i am running a Daphne and a Worker for Django Channels. I have already reboot all containers (I use Docker), cleaned Redis Cache. Today, these applications stoped to work and return this stack: KeyError: 'leads-198' 2019-03-27…