Open sentry-io[bot] opened 1 month ago
Sentry Issue: COURTLISTENER-84X
consuming input failed: terminating connection due to administrator command
SSL connection has been closed unexpectedly
I performed some tests related to these issues and was able to reproduce the following error locally:
OperationalError
consuming input failed: terminating connection due to administrator command
SSL connection has been closed unexpectedly
by setting the DB idle_session_timeout
to a value smaller than max_idle
.
However, @blancoramiro confirmed that this value is set to 0 for the production DB, meaning it's disabled, and connections shouldn't be terminated by the DB server.
Therefore, the issue could be caused by something else, which requires further investigation. I believe using the dev DB and simulating concurrent load to help identify the root cause and find a solution.
Great, thanks. We could just ignore this, but it does seem like a good opportunity to help the community by being one of the first to solve it in the open.
I look forward to learning what you discover.
We got a lot of errors in Sentry after enabling connection pools in Django 5.1 with psycopg3. The one below is representative, and I'll see if I can link others.
For now, I'm just going to disable connection pools until we have a theory of what's going on.
We're using gunicorn with the following command:
And the custom worker we have there is:
We use postgres in AWS RDS.
OperationalError: couldn't get a connection after 30.00 sec
Sentry Issue: COURTLISTENER-85G