Process Engine and Logger enabling

I have 2 queries

1.I have 2 instances of process engine running from 2 different application but querying the same database for task, but getting below error every alternate day

Example
Application A with BPM1 - ProcessEngineA - CamundaDB1
Application B with BPM2 - ProcessEngineB - CamundaDB1

Error: “ENGINE 16004 Exception while closing camunda context”
##Error querying database cause: java.sql.SQLTra sientConnectionException :HikariPool -2 -Connection is not amiable

2.How to enable logs for process engine in camunda

Thanks
RajuSingh

To enable logging refer the following link.

https://docs.camunda.org/manual/7.9/user-guide/logging/

To debug your connection issue, add following debug statement in logback.

<logger name="com.zaxxer.hikari" level="debug" additivity="false">
    <appender-ref ref="STDOUT"/>
</logger>