Check this https://github.com/encode/uvicorn/issues/1116
It is same issue and it mentions some workarounds.