psycopg2.DatabaseError: SSL connection has been closed unexpectedly
Asked Answered
C

1

8

I am facing issues committing to my RDS postgres instance using psycopg2. Everything was working fine earlier, just started noticing it recently.

What does this error mean? Is there anyway my postgres DB/table(s) are corrupt? All of the SQL query prior to committing is working, but I am only seeing this error at the time of commit.

psycopg2.DatabaseError: SSL connection has been closed unexpectedly CONTEXT: Remote SQL command: COMMIT TRANSACTION

Culch answered 17/10, 2019 at 19:30 Comment(1)
We are also getting this intermittently, did you get any resolution or found a way to recreate with intent?Mangonel
S
0

I faced a similar issue and I thought it related to synchronous replication. However, I am almost certain this relates to foreign data wrappers. Do you have foreign tables involved in your query? If so, you need to check your logs on whatever foreign server your query is pointing to.

I base this opinion on the fact that I only find that code here in postgres: https://github.com/postgres/postgres/blob/master/contrib/postgres_fdw/connection.c#L873

See https://www.postgresql.org/docs/current/postgres-fdw.html

Samantha answered 1/3, 2023 at 19:0 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.