Retry Logic when working with a Postgres Virtual Graph

We are connecting through a Virtual Graph to a Postgres DB server. The connection sometimes goes down (it even does this within a psql session - but psql reconnects). It appears that Stardog just errors in case of connection problems.

Here are some of the errors that we have received:
1)

WARNING: Unable to clear Warnings, connection will be closed.
org.postgresql.util.PSQLException: This connection has been closed.
        at org.postgresql.jdbc.PgConnection.checkClosed(PgConnection.java:783)
        at org.postgresql.jdbc.PgConnection.clearWarnings(PgConnection.java:694)
        at org.apache.tomcat.jdbc.pool.PooledConnection.clearWarnings(PooledConnection.java:813)
        at org.apache.tomcat.jdbc.pool.ConnectionPool.returnConnection(ConnectionPool.java:977)
        at org.apache.tomcat.jdbc.pool.ProxyConnection.invoke(ProxyConnection.java:100)
        at org.apache.tomcat.jdbc.pool.JdbcInterceptor.invoke(JdbcInterceptor.java:108) ...

WARN  2020-04-29 12:48:32,812 [stardog-user-2] com.complexible.stardog.protocols.http.server.StardogUndertowErrorHandler:accept(61): Unexpected exception was handled by the server
java.net.SocketException: Broken pipe (Write failed)
        at java.net.SocketOutputStream.socketWrite0(Native Method) ~[?:1.8.0_252]
        at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:111) ~[?:1.8.0_252]
        at java.net.SocketOutputStream.write(SocketOutputStream.java:155) ~[?:1.8.0_252]
        at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82) ~[?:1.8.0_252]
        at java.io.BufferedOutputStream.write(BufferedOutputStream.java:121) ~[?:1.8.0_252]
        at java.io.FilterOutputStream.write(FilterOutputStream.java:97) ~[?:1.8.0_252] ...
WARN  2020-04-29 12:52:17,299 [stardog-user-5] com.complexible.stardog.protocols.http.server.StardogUndertowErrorHandler:accept(61): Unexpected exception was handled by the server
org.postgresql.util.PSQLException: This connection has been closed.
        at org.postgresql.jdbc.PgConnection.checkClosed(PgConnection.java:783) ~[postgresql-42.2.5.jar:42.2.5]
        at org.postgresql.jdbc.PgConnection.createStatement(PgConnection.java:1673) ~[postgresql-42.2.5.jar:42.2.5]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_252]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_252]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_252]
        at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_252]
        at org.apache.tomcat.jdbc.pool.ProxyConnection.invoke(ProxyConnection.java:126) ~[tomcat-jdbc-9.0.24.jar:?] ...
WARN  2020-04-29 13:49:02,257 [stardog-user-5] com.complexible.stardog.protocols.http.server.StardogUndertowErrorHandler:accept(61): Unexpected exception was handled by the server
org.postgresql.util.PSQLException: ERROR: invalid reference to FROM-clause entry for table "t66"
  Hint: There is an entry for table "t66", but it cannot be referenced from this part of the query.
  Position: 71843
        at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2440) ~[postgresql-42.2.5.jar:42.2.5]
        at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2183) ~[postgresql-42.2.5.jar:42.2.5]
        at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:308) ~[postgresql-42.2.5.jar:42.2.5]
        at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:441) ~[postgresql-42.2.5.jar:42.2.5]
        at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:365) ~[postgresql-42.2.5.jar:42.2.5]
        at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:307) ~[postgresql-42.2.5.jar:42.2.5]
        at org.postgresql.jdbc.PgStatement.executeCachedSql(PgStatement.java:293) ~[postgresql-42.2.5.jar:42.2.5]
        at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:270) ~[postgresql-42.2.5.jar:42.2.5]
        at org.postgresql.jdbc.PgStatement.executeQuery(PgStatement.java:224) ~[postgresql-42.2.5.jar:42.2.5]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_252]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_252]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_252]
        at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_252]
        at org.apache.tomcat.jdbc.pool.StatementFacade$StatementProxy.invoke(StatementFacade.java:114) ~[tomcat-jdbc-9.0.24.jar:?] ...

I would expect retry logic in the Stardog code but maybe it is not working correctly??

What would you suggest?
Andrea