Questions tagged [daphne]

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

259 questions
0
votes
1 answer

Using Django channels with apache2 and daphne (webbSocket connection to 'wss://MYDOMAIN/ws/main/' failed:)

I have been playing around with django channels and everything seemed to be working in my development environment, but now I am having trouble deploying it to my local server. I am aware there have been similar questions on this topic and I have…
0
votes
1 answer

Unable to open Secure Websocket Requests with Daphne + Django Rest Framework

I want to enable secure websocket connection to my Django Rest Framework application. I see that all services are starting correctly, but still when I try to connect via the following URL, the connection does not get established. It just fails…
Neo
  • 49
  • 12
0
votes
1 answer

Exception while running docker-compose up with Django Rest Framework

To setup secure websocket in Django Rest Framework, I added Daphne to docker-compose.yml as follows daphne: platform: linux/amd64 build: context: . dockerfile: Dockerfile.dev command: 'sh -c "daphne -b 0.0.0.0 -p 8000 …
Neo
  • 49
  • 12
0
votes
0 answers

How to implement server sent events in django app using http views?

I have a django asgi app that is served by daphne. I am trying to add Server Sent events to stream data from server to client. My asgi.py: """ ASGI config for app project. It exposes the ASGI callable as a module-level variable named…
Saurav Prakash
  • 1,880
  • 1
  • 13
  • 24
0
votes
1 answer

DigitalOcean: Django, Channels, Redis & Daphne

I am having issues with running websockets on DigitalOcean's App platform. I think I am fundamentally missing a configuration as it relates to Daphne. Here is my setup: Daphne 4.0.0 Channels-Redis 3.4.1 Settings.py INSTALLED_APPS = [ ... #…
cbirch
  • 90
  • 5
0
votes
2 answers

AttributeError in ASGI/Daphne Django problem

I had done this tutorial for WebSocket with Django but I have this problem when I execute "python manage.py runserver": HTTP GET /chat/hello/ 200 [0.01, 127.0.0.1:65009] WebSocket HANDSHAKING /ws/chat/hello/ [127.0.0.1:65014] Exception inside…
LuisFerchx
  • 37
  • 8
0
votes
0 answers

Django channels connection failed (nginx + daphne + certbot + docker-compose)

I'm using Django channels using docker-compose and nginx outside it websockets were working just fine but after installing certbot, it stopped working it returns 404 as if it is treated as just normal http request VM253:1 WebSocket connection to…
mohamed naser
  • 359
  • 3
  • 9
0
votes
0 answers

Making external http calls using requests package within Daphne

I have a Django project that runs by Daphne, one of my views needs to submit a http request externally using the requests package, unfortunately that package is not async compatible, so if the http call is blocked, the whole Daphne app hangs. An…
James Lin
  • 25,028
  • 36
  • 133
  • 233
0
votes
0 answers

Django channels daphne: missing 1 required positional argument: 'send'

Hi I am having issues getting django channels working in production. I am running gunicorn --bind 0.0.0.0:8000 project_name.asgi to test that my ASGI setup is working correctly (This all works on my local machine which is super odd. Maybe I am…
Darren-Jaen
  • 155
  • 1
  • 10
0
votes
1 answer

How to increase django/nxginx/uwsgi page load size limit?

I am using nginx and uWsgi with django (using daphne) to serve a simple one page site. I have reached a point where if I put more html objects on the page it loads to a certain point and does not load the rest. For example if I add a table with 60…
simon lombard
  • 23
  • 1
  • 4
0
votes
0 answers

What is the correct way to configure ASGI application for channels in Django?

I've just started to learn about channels and asgi in django in few tutorials that i've seen they do this to configure the asgi apllication asgi.py import os from django.core.asgi import get_asgi_application from channels.routing import…
0
votes
0 answers

How to setup Django channels on GCP App Engine?

I have a Django application that uses the channels package for WebSocket. I'm using the daphne interface server to run the app on the Google Cloud App Engine Flex environment, but the backend service is not able to serve concurrent requests. Is…
Nebex Elias
  • 252
  • 1
  • 3
  • 14
0
votes
0 answers

Daphne processes run by supervisor don't share memory

I have a Django app that uses Daphne behind Nginx as an app server. I have first used Gunicorn + Uvicorn as an app server but I ran into a problem that I thought I could avoid by simply switching to Daphne. Unfortunately, when I switched to Daphne,…
0
votes
1 answer

django channels deploying with daphne error Requested setting INSTALLED_APPS, but settings are not configured

Hello I'm following this tutorial https://github.com/mitchtabian/HOWTO-django-channels-daphne to deploy mn django channels app and I'm having problem with starting the daphne. I created the daphne.service so far ; [Unit] Description=WebSocket Daphne…
Ar So
  • 21
  • 4
0
votes
1 answer

Is there a way to enable secure websockets on Django?

I can't use secure websockets on Django with the sll enabled. I use the sslserver package for Django to allow HTTPS on the development server. My goal is to make a secure chat. Here is the configuration : INSTALLED_APPS = [ 'channels', …
MalloryLP
  • 5
  • 5