What does the "could not accept SSL connection: Success" PostgreSQL error mean?

Issue

I'm seeing "could not accept SSL connection: Success" errors through my Heroku Postgres database logs but the error message doesn't clarify what's the problem.

Resolution

This confusing error message is due to a bug in the OpenSSL version running on Heroku Postgres databases, that internally returns a 0 error code when it detects an unexpected EOF from the peer/client. This error code makes PostgreSQL report the error message as "Success".

The "could not accept SSL connection: Success" database connection errors should be considered similar to "could not accept SSL connection: EOF detected". More details on these errors are available at "Understanding Heroku Postgres Log Statements and Common Errors: SSL SYSCALL error: EOF detected".

These errors can appear if your application is unexpectedly terminating the PostgreSQL connection without closing it properly, but can also resurface from abrupt terminations from other connections such as the ones coming from the own Heroku Postgres monitoring.

Ask on Stack Overflow

Engage with a community of passionate experts to get the answers you need

Ask on Stack Overflow

Heroku Support

Create a support ticket and our support experts will get back to you

Contact Heroku Support