Database connection pool
Check why this happens during ES reindexing:
19:05:32.766 [genesys-background-27] ERROR org.hibernate.engine.jdbc.spi.SqlExceptionHelper - (conn=203) Communications link failure with secondary host mariadb2:3306. Connection reset by peer (Write failed)
19:05:32,767 genesys-background-27 ERROR o.g.s.s.i.ElasticsearchServiceImpl:602 - org.hibernate.exception.JDBCConnectionException: could not extract ResultSet
javax.persistence.PersistenceException: org.hibernate.exception.JDBCConnectionException: could not extract ResultSet
at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:154)
...
at org.genesys2.server.service.impl.ElasticsearchServiceImpl.update(ElasticsearchServiceImpl.java:627)
...
at org.genesys2.server.service.impl.ElasticsearchServiceImpl.lambda$asyncUpdate$3(ElasticsearchServiceImpl.java:600)
...
Caused by: java.sql.SQLInvalidAuthorizationSpecException: (conn=203) Communications link failure with secondary host mariadb2:3306. Connection reset by peer (Write failed)
...
Caused by: java.sql.SQLException: Communications link failure with secondary host mariadb2:3306. Connection reset by peer (Write failed)
on HostAddress{host='mariadb2', port=3306, type='replica'},master=false. Driver has reconnect connection
at org.mariadb.jdbc.internal.failover.AbstractMastersListener.throwFailoverMessage(AbstractMastersListener.java:563)
at org.mariadb.jdbc.internal.failover.FailoverProxy.handleFailOver(FailoverProxy.java:391)
...
Caused by: java.sql.SQLNonTransientConnectionException: Connection reset by peer (Write failed)
at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.handleIoException(AbstractQueryProtocol.java:2076)
...
Caused by: java.net.SocketException: Connection reset by peer (Write failed)
at java.base/java.net.SocketOutputStream.socketWrite0(Native Method)