-
-
Notifications
You must be signed in to change notification settings - Fork 154
Description
Python Version
3.12
Django Version
4.2.9
Package Version
6.6.0
Description
Greetings dear fellows!
We are experiencing a lot of “InterfaceError: connection already closed” and “TransactionManagementError”. They are not necessarily accompany each other, but both are consistently happening.
PG logs are not showing anything unexpected or suspicious, but Django closing the connections.
Affected endpoints are different, and I see no common behaviour in them. For example, it sometimes fails even in the basic non-customized admin interface during GET requests.
It does not happen locally.
We did post more details in the following thread:
https://forum.djangoproject.com/t/interfaceerror-and-transactionmanagementerror-postgresql/16924
Later I noticed other people were sharing the similar issues:
- https://forum.djangoproject.com/t/seemingly-random-postgresql-connection-drops-while-handling-django-requests/19026
- https://forum.djangoproject.com/t/django-db-issue-interface-error-connection-closed/21535
And one recent comment was about suspecting a WhiteNoise upgrade.
We did downgrade WhiteNoise version from 6.6.0 to 5.3.0 (one major version) and it indeed resolved all mentioned issues on our instances.
I am struggling to pin the issue down to the change, but happy to assist and provide any other details.
Best,
Rust