Hi,
I'm facing a strange issue with Daphne 3 + Channels 3.0.2 and handling multiple request.
I setup a really simple project so we have a base for discussion :)
So, I'm running the project on OS Ubuntu 18.04 with python 3.7.
My requirements are:
Django==3.1.3
daphne==3.0.0
channels==3.0.2
django-environ==0.4.5
My setup
- I registered
channels in installed apps and pointed to this routing:
application = ProtocolTypeRouter({
'websocket': URLRouter([])
})
- I added 2 simple views:
def view_1(request): # Url is `/1/`
make_it_slow() # Sleeps for 3 seconds
return HttpResponse('view_1 response')
def view_2(request): # Url is `/2/`
make_it_slow() # Sleeps for 3 seconds
return HttpResponse('view_2 response')
- I ran the application:
daphne daphne_3_issue_demo.asgi:application
The issue
So I opened 2 shells and ran these in parralel:
curl http://localhost:8000/1/ and curl http://localhost:8000/2/
So what I noticed is that the first finished response arrives to the last requesting client and the other request just hangs until it times out.
Here's what I mean:

P.S.: I think this issue is extending the existing one but it's not the exactly the same.
Best regards,
Ivo
Hi,
I'm facing a strange issue with Daphne 3 + Channels 3.0.2 and handling multiple request.
I setup a really simple project so we have a base for discussion :)
So, I'm running the project on
OS Ubuntu 18.04withpython 3.7.My requirements are:
My setup
channelsin installed apps and pointed to this routing:The issue
So I opened 2 shells and ran these in parralel:
curl http://localhost:8000/1/andcurl http://localhost:8000/2/So what I noticed is that the first finished response arrives to the last requesting client and the other request just hangs until it times out.
Here's what I mean:

P.S.: I think this issue is extending the existing one but it's not the exactly the same.
Best regards,
Ivo