-
-
Notifications
You must be signed in to change notification settings - Fork 724
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not respecting Django's CONN_MAX_AGE database setting #386
Comments
Doesn’t appear related to Uvicorn. |
@tomchristie But the connection is persistent when used with wsgi and without uvicorn worker class. Any reason you can think of? |
Maybe start by trying other ASGI servers: daphne, hypercorn. If you can isolate this issue to specifically uvicorn, then we should dig further. |
Hey @tomchristie, thanks for your suggestion. I tried all the ASGI servers, i.e. uvicorn, daphne, hypercorn But when i try running gunicorn with wsgi application, it does not disconnects the database server just after the request completion (respects the CONN_MAX_AGE). What is the reason behind ASGI servers not respecting this django setting? Would you recommend running chat server separate from the web server (that would also be a workaround for this)? |
Not sure, but this needs raising on channels or django or something - its not a uvicorn issue. |
I do not think this is a uvicorn issue. I this this provides some more light: benoitc/gunicorn#996 although I was not able to solve the problem yet. |
Hi,
I'm using
uvicorn
withgunicorn
.I have assigned CONN_MAX_AGE setting a value say 300 but its closing the connection instantly after completing the request.
My gunicorn configuration is like,
And i'm running the following command to start the server,
The text was updated successfully, but these errors were encountered: