Skip to content

Commit 5a4023f

Browse files
committed
Add more information on PostgreSQL max_connections tuning
1 parent 7c93cad commit 5a4023f

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

docs/docs/deployment/ibm-code-engine.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,9 +305,12 @@ Scale up at any time with:
305305
```bash
306306
ibmcloud cdb deployment-scaling-set mcpgw-db \
307307
--members 3 --memory-gb 16
308+
309+
# Update the number of maximum connections:
310+
ibmcloud cdb deployment-configuration YOUR_DB_CRN '{"configuration":{"max_connections":215}}'
308311
```
309312
310-
The gateway will reconnect transparently because the host name remains stable.
313+
The gateway will reconnect transparently because the host name remains stable. See the [documentation for more details](https://cloud.ibm.com/docs/databases-for-postgresql?topic=databases-for-postgresql-managing-connections&locale=en#raise-connection-limit).
311314
312315
---
313316

docs/docs/manage/tuning.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
>
77
> 1. Tune the **runtime environment** via `.env` and configure mcpgateway to use PostgreSQL and Redis.
88
> 2. Adjust **Gunicorn** workers & time‑outs in `gunicorn.conf.py`.
9-
> 3. Right‑size **CPU/RAM** for the container or spin up more instances (with shared Redis state).
9+
> 3. Right‑size **CPU/RAM** for the container or spin up more instances (with shared Redis state) and change the database settings (ex: connection limits).
1010
> 4. Benchmark with **hey** (or your favourite load‑generator) before & after.
1111
1212
---
@@ -51,6 +51,8 @@ Edit the file **before** building the image, then redeploy.
5151

5252
> Always test with **your** workload; JSON‑RPC payload size and backend model latency change the equation.
5353
54+
To change your database connection settings, see the respective documentation for your selected database or managed service. For example, when using IBM Cloud Databases for PostgreSQL - you can [raise the maximum number of connections](https://cloud.ibm.com/docs/databases-for-postgresql?topic=databases-for-postgresql-managing-connections&locale=en#postgres-connection-limits).
55+
5456
---
5557

5658
## 4 · Performance testing

tests/hey/hey.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ HEY_CMD=(
113113
-m "$METHOD"
114114
-T "$CONTENT_TYPE"
115115
-D "$PAYLOAD_FILE"
116+
-t 60
116117
)
117118

118119
# Append each header

0 commit comments

Comments
 (0)