# Lock Queries Flowable with Postgress SQL issues

**URL:** <https://forum.flowable.org/t/lock-queries-flowable-with-postgress-sql-issues/6071>\
**Category:** Flowable Engine\
**Created:** [May 23, 2020, 1:40pm UTC](https://forum.flowable.org/t/lock-queries-flowable-with-postgress-sql-issues/6071 "2020-05-23T13:40:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gihan](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/gihan/32/1803_2.png) [@gihan](https://forum.flowable.org/u/gihan)\
**Post date:** [May 23, 2020, 1:40pm UTC](https://forum.flowable.org/t/lock-queries-flowable-with-postgress-sql-issues/6071/1 "2020-05-23T13:40:11Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![dmitryfar](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/dmitryfar/32/477_2.png) [@dmitryfar](https://forum.flowable.org/u/dmitryfar)\
**Post date:** [May 24, 2020, 8:56am UTC](https://forum.flowable.org/t/lock-queries-flowable-with-postgress-sql-issues/6071/2 "2020-05-24T08:56:45Z")

</div>

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:

> **[brettwooldridge/HikariCP](https://github.com/brettwooldridge/HikariCP/wiki/About-Pool-Sizing)**
>
> 光 HikariCP・A solid, high-performance, JDBC connection pool at last. - brettwooldridge/HikariCP

---

<div class="post-metadata">

**Author:** ![gihan](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/gihan/32/1803_2.png) [@gihan](https://forum.flowable.org/u/gihan)\
**Post date:** [June 21, 2020, 10:55am UTC](https://forum.flowable.org/t/lock-queries-flowable-with-postgress-sql-issues/6071/3 "2020-06-21T10:55:19Z")

</div>

thanks for the reply it fixed our issue
