1

I'm running application that is using Django 1.10 as an ORM connecting to a Postgres DB (managed by AWS RDS).

At time to time, I'm getting a lot of OperationalError: SSL SYSCALL error: EOF detected exceptions, and then everything goes back to normal like it never happened.

I think its related to the error unexpected EOF on client connection with an open transaction as i see it in the log files, but i'm not sure.

More useful information:

  • This is not a firewall problem, as we use only AWS security groups which can only block things based on the port.
  • The queries getting this exceptions are very simple, which usually takes milliseconds to return.
  • Memory, cpu and disk space looking as usual during this episodes.
  • I suspect that this is not a table locking problem, because everything goes back to normal after it happens, I cant say that for sure because Postgres is not displaying old locks, only current ones in realtime.

  • My Postgres Engine version is 9.6.8

  • We see a lot of idle connections in the DB. can it be related?
Laurenz Albe
  • 209,280
  • 17
  • 206
  • 263
  • Related: https://stackoverflow.com/questions/24130305/postgres-ssl-syscall-error-eof-detected-with-python-and-psycopg – dfundako Jun 27 '19 at 14:47

1 Answers1

0

The error is very generic, it just means “something fails in the TLS communication”.

I'll come up with a small list of potential causes, without any claim to completeness.

  • It can be a firewall problem (you ruled that option out).

  • It can be a problem of TLS key renegotiation.

    This caused all kinds of problems with different OpenSSL versions and client drivers and was abandoned in PostgreSQL 9.5, so this can only be the problem if you are using an old and unpatched server version.

Laurenz Albe
  • 209,280
  • 17
  • 206
  • 263