Skip to content

Commit f6bff29

Browse files
Update hikari settings, add troubleshooting section to README.md
1 parent 7a79575 commit f6bff29

2 files changed

Lines changed: 18 additions & 1 deletion

File tree

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,3 +292,16 @@ Documentation is built using Sphinx. Documents from other OpenLMIS repositories
292292

293293
Documentation is available at:
294294
http://openlmis.readthedocs.io
295+
296+
## Troubleshooting
297+
298+
When connecting locally to the `UAT` database on some networks connections were being cut after short amount of time. In order to
299+
resolve it we have added following code to the `.env` file:
300+
301+
```
302+
spring.datasource.hikari.maxLifetime=180000
303+
spring.datasource.hikari.idleTimeout=90000
304+
```
305+
306+
When some requests are throwing `404` errors it is possible that the NGINX_TIMEOUT value has to be adjusted in the `.env` file.
307+

settings-sample.env

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ CLIENT_MAX_BODY_SIZE=1m
9494
# Sets a timeout for transmitting a response to the client.
9595
# SEND_TIMEOUT=60s
9696
# This property set the same value for PROXY_CONNECT_TIMEOUT, PROXY_SEND_TIMEOUT, PROXY_READ_TIMEOUT and SEND_TIMEOUT
97-
NGINX_TIMEOUT=900s
97+
NGINX_TIMEOUT=300s
9898

9999
# A list of origins that are allowed. Comment out to disable CORS.
100100
# CORS_ALLOWED_ORIGINS=*
@@ -187,3 +187,7 @@ LOT_NEAR_EXPIRY_CRON=0 0 0 * * ?
187187
# Note: Comment out this variable if you use the reporting stack
188188
# Set the URL to Superset instance
189189
# SUPERSET_URL=https://superset.uat.openlmis.org
190+
191+
# Hikari config
192+
spring.datasource.hikari.maxLifetime=180000
193+
spring.datasource.hikari.idleTimeout=90000

0 commit comments

Comments
 (0)