In django asynchronous view, multiple consecutive requests will not run?

In django asynchronous view, multiple consecutive requests will not run?
Why do some requests run the test_async() function, but some do not run. Is this because Django’s asynchronous view is unstable?Maybe my writing is wrong. It seems that I have overlooked something, which master can help me?
I wrote a simple asynchronous view, but I don’t know if it’s completely correct.

from django.http import HttpResponse
from asgiref.sync import sync_to_async
import asyncio
import time

def test_async():
    print('test_async start')
    print('test_async end')

#view function
async def wechatAPI(request):
    return HttpResponse('success')

I manually request through the browser, and the click frequency is not fast. But the response to this request seems too late to be processed, and it is not exactly the case.
Why can’t it respond to every request like a message queue, no matter how late? Maybe it’s because Django asynchronous view can’t do the function like message queue at all?
test_async start
[22/Jun/2021 11:25:05] “GET /wechat/ HTTP/1.1” 200 7
[22/Jun/2021 11:25:07] “GET /wechat/ HTTP/1.1” 200 7
[22/Jun/2021 11:25:07] “GET /wechat/ HTTP/1.1” 200 7
test_async end
[22/Jun/2021 11:25:10] “GET /wechat/ HTTP/1.1” 200 7
[22/Jun/2021 11:25:11] “GET /wechat/ HTTP/1.1” 200 7
[22/Jun/2021 11:25:12] “GET /wechat/ HTTP/1.1” 200 7
[22/Jun/2021 11:25:12] “GET /wechat/ HTTP/1.1” 200 7
[22/Jun/2021 11:25:13] “GET /wechat/ HTTP/1.1” 200 7
[22/Jun/2021 11:25:14] “GET /wechat/ HTTP/1.1” 200 7
[22/Jun/2021 11:25:18] “GET /wechat/ HTTP/1.1” 200 7
[22/Jun/2021 11:25:20] “GET /wechat/ HTTP/1.1” 200 7
[22/Jun/2021 11:25:21] “GET /wechat/ HTTP/1.1” 200 7
[22/Jun/2021 11:25:22] “GET /wechat/ HTTP/1.1” 200 7
[22/Jun/2021 11:25:23] “GET /wechat/ HTTP/1.1” 200 7
[22/Jun/2021 11:25:24] “GET /wechat/ HTTP/1.1” 200 7
test_async start
[22/Jun/2021 11:25:25] “GET /wechat/ HTTP/1.1” 200 7
[22/Jun/2021 11:25:26] “GET /wechat/ HTTP/1.1” 200 7
[22/Jun/2021 11:25:27] “GET /wechat/ HTTP/1.1” 200 7
test_async end

How are you running your server?

Are you using Chrome? If so, is it possible that you’re running into this? Are calls to the SAME view synchronous? (You could try your same test using Firefox to determine that.)

I used two methods for testing, and the results were the same. One is the django debugging server: python runserver ip:port, and the other is the production server: IIS->wfastcgi->django.
In addition, I also used another API web server for request testing, and the results were the same.
I used new edge in the browser test.
I saw the example you gave. I don’t think my problem is caused by the browser. Of course, I just tested it again, and I am more convinced that it has nothing to do with the browser.

In the Asynchronous support | Django documentation | Django docs, there’s this:

Under a WSGI server, async views will run in their own, one-off event loop. This means you can use async features, like concurrent async HTTP requests, without any issues, but you will not get the benefits of an async stack.

See the docs on How to deploy with asgi for setting up a “true” async environment.

Thank you very much.

Following your suggestion, I used uvicorn ASGI framework and I tested it. Although I got the benefits of the asynchronous stack, the “@sync_to_async” decorator didn’t work. The request was delayed and the asynchronous effect was not achieved. How can it be achieved: calling a synchronous function in an asynchronous view without waiting for a blocking operation to respond?

Please be more specific and provide details regarding exactly what you mean by this. What is the behavior you’re seeing, and how does that differ from what you’re expecting?
To try and rephrase that slightly - what are you hoping to have happen?