Skip to content

Commit

Permalink
Update hikari settings, add troubleshooting section to README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
mgrochalskisoldevelo committed Dec 22, 2023
1 parent 7a79575 commit f6bff29
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -292,3 +292,16 @@ Documentation is built using Sphinx. Documents from other OpenLMIS repositories

Documentation is available at:
http://openlmis.readthedocs.io

## Troubleshooting

When connecting locally to the `UAT` database on some networks connections were being cut after short amount of time. In order to
resolve it we have added following code to the `.env` file:

```
spring.datasource.hikari.maxLifetime=180000
spring.datasource.hikari.idleTimeout=90000
```

When some requests are throwing `404` errors it is possible that the NGINX_TIMEOUT value has to be adjusted in the `.env` file.

6 changes: 5 additions & 1 deletion settings-sample.env
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ CLIENT_MAX_BODY_SIZE=1m
# Sets a timeout for transmitting a response to the client.
# SEND_TIMEOUT=60s
# This property set the same value for PROXY_CONNECT_TIMEOUT, PROXY_SEND_TIMEOUT, PROXY_READ_TIMEOUT and SEND_TIMEOUT
NGINX_TIMEOUT=900s
NGINX_TIMEOUT=300s

# A list of origins that are allowed. Comment out to disable CORS.
# CORS_ALLOWED_ORIGINS=*
Expand Down Expand Up @@ -187,3 +187,7 @@ LOT_NEAR_EXPIRY_CRON=0 0 0 * * ?
# Note: Comment out this variable if you use the reporting stack
# Set the URL to Superset instance
# SUPERSET_URL=https://superset.uat.openlmis.org

# Hikari config
spring.datasource.hikari.maxLifetime=180000
spring.datasource.hikari.idleTimeout=90000

0 comments on commit f6bff29

Please sign in to comment.