4

My Heroku application uses PostgreSQL on AWS via Spring Data JPA. Occasionally, under high load, I see errors like this:

Caused by: javax.net.ssl.SSLProtocolException: Data received in non-data state: 6

at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1111)
at sun.security.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:933)
at sun.security.ssl.AppInputStream.read(AppInputStream.java:105)
at org.postgresql.core.VisibleBufferedInputStream.readMore(VisibleBufferedInputStream.java:140)
at org.postgresql.core.VisibleBufferedInputStream.ensureBytes(VisibleBufferedInputStream.java:109)
at org.postgresql.core.VisibleBufferedInputStream.read(VisibleBufferedInputStream.java:191)
at org.postgresql.core.PGStream.receive(PGStream.java:487)
at org.postgresql.core.PGStream.receiveTupleV3(PGStream.java:396)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2118)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:288)
... 204 more

The call to JSSE is done within the PostgreSQL driver which, in turn, is done from Spring Data JPA. Any idea what I can do, if anything, at the application level to address this?

Related: This question Program never throws exception when debugger is attached has a similar symptom, but is triggered from the AWS SDK and the suggested solutions do not apply.

Jan Nielsen
  • 10,892
  • 14
  • 65
  • 119

0 Answers0