Closed abbas-mohd56 closed 5 months ago
This isn't directly an asgiref issue - it looks like you're creating django database objects in one thread and then reusing them in another. Unless you can pinpoint this to exact wrong asgiref behaviour, I suspect you've just ended up in a situation where threading is a little different and has uncovered a bug you already had?
Hi,
I have a django project deployed in production with Gunicorn as my server. The project is containerized using docker. I don't have
asgiref
specified in my requirements so the latest version is installed when I rebuild the image. When I run my webserver using gunicorn, I'm getting the following error:I'm only facing this issue when I run the server using Gunicorn, Running server with django's runserver command didn't seem to raise this error. Upon further investigation, I found out that this issue started appearing from
asgiref
version3.8.0
.Traceback:
Environment
Python:
3.10.13
Django:3.2.25
Gunicorn:22.0.0
gevent:24.2.1