docs: fix MongoDB pool default values to match code

Actual defaults in lib/storage/mongo-storage.js:
- MONGO_POOL_SIZE: 5 (not 10)
- MONGO_MIN_POOL_SIZE: 0 (not 1)
- MONGO_MAX_IDLE_TIME_MS: 30000 (not 10000)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Ben West
2026-03-17 14:36:34 -07:00
co-authored by Copilot
parent a2c6ce1e5a
commit ca22e8d930
2 changed files with 8 additions and 8 deletions
+5 -5
View File
@@ -194,15 +194,15 @@ These variables control test behavior and MongoDB connection pooling:
| Variable | Purpose | Default | | Variable | Purpose | Default |
|----------|---------|---------| |----------|---------|---------|
| `NODE_ENV=test` | **Required** - Enables test mode, prevents production DB access | - | | `NODE_ENV=test` | **Required** - Enables test mode, prevents production DB access | - |
| `MONGO_POOL_SIZE` | MongoDB connection pool size | 10 | | `MONGO_POOL_SIZE` | MongoDB connection pool size | 5 |
| `MONGO_MIN_POOL_SIZE` | Minimum pool connections to keep open | 1 | | `MONGO_MIN_POOL_SIZE` | Minimum pool connections to keep open | 0 |
| `MONGO_MAX_IDLE_TIME_MS` | Max idle time (ms) before closing connection | 10000 | | `MONGO_MAX_IDLE_TIME_MS` | Max idle time (ms) before closing connection | 30000 |
| `AUTH_FAIL_DELAY` | Delay (ms) after auth failure (test speedup) | 5000 | | `AUTH_FAIL_DELAY` | Delay (ms) after auth failure (test speedup) | 5000 |
For CI or resource-constrained environments, reduce pool size: For CI or resource-constrained environments, adjust pool size:
```bash ```bash
MONGO_POOL_SIZE=5 MONGO_MIN_POOL_SIZE=1 npm test MONGO_POOL_SIZE=3 MONGO_MIN_POOL_SIZE=1 npm test
``` ```
## Other Dev Tips ## Other Dev Tips
+3 -3
View File
@@ -289,9 +289,9 @@ autonomy for your data:
* `MONGO_PROFILE_COLLECTION`(`profile`) - The collection used to store your profiles * `MONGO_PROFILE_COLLECTION`(`profile`) - The collection used to store your profiles
* `MONGO_FOOD_COLLECTION`(`food`) - The collection used to store your food database * `MONGO_FOOD_COLLECTION`(`food`) - The collection used to store your food database
* `MONGO_ACTIVITY_COLLECTION`(`activity`) - The collection used to store activity data * `MONGO_ACTIVITY_COLLECTION`(`activity`) - The collection used to store activity data
* `MONGO_POOL_SIZE` (`10`) - MongoDB connection pool size. Reduce for resource-constrained environments. * `MONGO_POOL_SIZE` (`5`) - MongoDB connection pool size. Adjust for your deployment needs.
* `MONGO_MIN_POOL_SIZE` (`1`) - Minimum pool connections to keep open. * `MONGO_MIN_POOL_SIZE` (`0`) - Minimum pool connections to keep open.
* `MONGO_MAX_IDLE_TIME_MS` (`10000`) - Max idle time (ms) before closing a connection. * `MONGO_MAX_IDLE_TIME_MS` (`30000`) - Max idle time (ms) before closing a connection.
* `PORT` (`1337`) - The port that the node.js application will listen on. * `PORT` (`1337`) - The port that the node.js application will listen on.
* `HOSTNAME` - The hostname that the node.js application will listen on, null by default for any hostname for IPv6 you may need to use `::`. * `HOSTNAME` - The hostname that the node.js application will listen on, null by default for any hostname for IPv6 you may need to use `::`.
* `SSL_KEY` - Path to your ssl key file, so that ssl(https) can be enabled directly in node.js. If using Let's Encrypt, make this variable the path to your privkey.pem file (private key). * `SSL_KEY` - Path to your ssl key file, so that ssl(https) can be enabled directly in node.js. If using Let's Encrypt, make this variable the path to your privkey.pem file (private key).