Lock Queries Flowable with Postgress SQL issues

We faced multiple exceptions during work with Flowable engine in spring boot application
<flowable.version>6.4.2</flowable.version>

  1. we have some locking queries
    SELECT * FROM pg_stat_activity WHERE state != ‘idle’;
    we have about 6 queries is not idle and locked
    sample locked queries text
  2. select * from ACT_RU_VARIABLE
    where EXECUTION_ID_ = $1
    and TASK_ID_ is null
  3. update ACT_RU_EXECUTION
    set
    LOCK_TIME_ = null
    where ID_ = $1

We have other POSTGRESS issues happened:

  1. org.springframework.transaction.CannotCreateTransactionException: Could not open JDBC Connection for transaction; nested exception is java.sql.SQLTransientConnectionException: HikariPool-1 - Connection is not available, request timed out after 30000ms.

  2. could not receive data from client: Connection reset by peer

  3. Cause: org.postgresql.util.PSQLException: An I/O error occurred while sending to the backend.

please if i need support for all these issues why this happened

Gihan,
You need to increase Hikari connection pool size setting. By default it has 10. In a high load case you have manage it.
Setting parameter: spring.datasource.hikari.maximum-pool-size
See this post about pool sizing: