我的Heroku应用程序通过Spring Data JPA在AWS上使用PostgreSQL。有时候,在高负载下,我会看到如下错误:
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
对JSSE的调用是在PostgreSQL驱动程序中完成的,而该驱动程序又是从Spring Data JPA完成的。知道我可以在应用程序级别上解决该问题吗?
相关:该问题Program never throws exception when debugger is attached的症状类似,但是是从AWS开发工具包触发的,因此建议的解决方案不适用。