Free, Open Source, Self-Hosted WhatsApp API Gateway
TypeScript apibotgatewayself-hostedwhatsappwhatsapp-apiwhatsapp-automationwhatsapp-botwhatsapp-gatewaywhatsapp-gateway-apiwhatsapp-webwhatsapp-web-api
docs(session): scope the reconnect cap sentence to the gateway reconnect
Yudhi Armyndharisc9e6767e5669
diff --git a/docs/05-database-design.md b/docs/05-database-design.mdindex b07b2c585..1bb22b892 100644--- a/docs/05-database-design.md+++ b/docs/05-database-design.md@@ -384,8 +384,9 @@ clears it, and so does a gateway restart.| `reconnectBaseDelay` | `5000` ms | Base delay of the reconnect backoff, clamped to 1000-300000 ms. Same engine scope as `maxReconnectAttempts` || `autoRejectCalls` | `false` | Auto-reject an incoming call as soon as it rings (Baileys only) |-The reconnect attempt count restarts only once the session has stayed READY for 5 minutes, so a-session that keeps dropping sooner than that spends a finite `maxReconnectAttempts` and ends FAILED.+The gateway's reconnect attempt count restarts only once the session has stayed READY for 5 minutes,+so a session that keeps dropping sooner than that spends a finite `maxReconnectAttempts` and ends+FAILED. The Baileys in-engine retry has no attempt cap and never ends FAILED on a transient drop.Set them at creation with `POST /api/sessions`, or on an existing session with`PATCH /api/sessions/{sessionId}/config` — no restart, and no re-scan of the QR. The patch merges, so a keydiff --git a/docs/06-api-specification.md b/docs/06-api-specification.mdindex 2d44aa958..264f3e412 100644--- a/docs/06-api-specification.md+++ b/docs/06-api-specification.md@@ -301,11 +301,11 @@ in it is stored but ignored).````maxReconnectAttempts: null` means unlimited (the default); `reconnectBaseDelay` is milliseconds.-Both bound the gateway's own reconnect, which on Baileys covers only the reconnect after a-logged-out close: that engine retries a transient drop internally, with a fixed 1s to 60s backoff-and no attempt cap. The attempt count restarts only once the session has stayed READY for 5 minutes,-so a session that keeps dropping sooner than that spends its cap. See §5 (Database Design) for what-each key does and the moment it is read.+Both bound the gateway's own reconnect, whose attempt count restarts only once the session has+stayed READY for 5 minutes, so a session that keeps dropping sooner than that spends its cap. On+Baileys that covers only the reconnect after a logged-out close: that engine retries a transient drop+internally, with a fixed 1s to 60s backoff and no attempt cap. See §5 (Database Design) for what each+key does and the moment it is read.**Errors:** `401` missing/invalid key, or key not scoped to this session · `404` session not founddiff --git a/docs/12-troubleshooting-faq.md b/docs/12-troubleshooting-faq.mdindex 198b4422f..a8e4c424a 100644--- a/docs/12-troubleshooting-faq.md+++ b/docs/12-troubleshooting-faq.md@@ -646,12 +646,12 @@ The reconnect backoff is configured **per session**, not by environment variable`reconnectBaseDelay` is the exponential-backoff base in milliseconds (clamped to 1000–300000,default 5000). `maxReconnectAttempts` is clamped to 0–20 — `0` disables auto-reconnect entirely, andleaving it unset means unlimited retries with the delay parking at a 5-minute cap. Both keys bound-the gateway's own reconnect. On Baileys that is only the reconnect after a logged-out close: every-other drop is retried inside the engine, with a fixed 1s to 60s backoff and no attempt cap, so a-session behind an unreachable network keeps retrying there whatever these keys say. Subscribe to the-`session.reconnect_loop` webhook to be alerted on every 5th consecutive attempt. Attempts stop being-consecutive only once the session has stayed READY for 5 minutes, so a session that keeps dropping-sooner than that spends a finite cap and ends FAILED.+the gateway's own reconnect, whose attempt count restarts only once the session has stayed READY for+5 minutes, so a session that keeps dropping sooner than that spends a finite cap and ends FAILED. On+Baileys that is only the reconnect after a logged-out close: every other drop is retried inside the+engine, with a fixed 1s to 60s backoff and no attempt cap, so a session behind an unreachable network+keeps retrying there whatever these keys say. Subscribe to the `session.reconnect_loop` webhook to be+alerted on every 5th consecutive attempt.On a slow host, raise the first-boot init wait with `WWEBJS_AUTH_TIMEOUT_MS` (see _QR generationtimes out on slow first boot_ above).