Retry & Troubleshooting

ChatYug retries failed webhook deliveries with exponential backoff. Your endpoint should respond quickly with HTTP 2xx.

Delivery settings

SettingDefaultEnvironment variable
Maximum delivery attempts8WEBHOOK_MAX_ATTEMPTS
HTTP timeout per attempt8000 msWEBHOOK_DISPATCH_TIMEOUT_MS
Per-tenant rate limit300 events / minuteWEBHOOK_PER_TENANT_RPM
Dispatcher batch size50WEBHOOK_DISPATCH_BATCH_SIZE
Dispatcher poll interval5000 msWEBHOOK_DISPATCH_INTERVAL_MS

Retry backoff schedule

After a failed attempt (non-2xx HTTP response, timeout, or network error), ChatYug schedules the next attempt using this minute-based backoff:

AttemptWait before retry
11 minute
22 minutes
310 minutes
460 minutes
5+180 minutes

After all attempts are exhausted, the event is marked failed in ChatYug's delivery log.

Rate limiting

If your WABA exceeds 300 outbound webhook events per minute, additional events are deferred and retried after approximately one minute. Design your handler to be fast and idempotent.

Idempotency

Use eventId (and the X-Chatyug-Event-Id header) to deduplicate. The same event may be delivered more than once if your server returns a non-2xx status or times out after ChatYug already accepted the delivery.

Recommended handler pattern

  1. Verify X-Chatyug-Signature on the raw body (if secret configured).
  2. Check eventId against your processed-events store; skip if already handled.
  3. Return HTTP 200 immediately.
  4. Process the event asynchronously (queue, worker, background job).

Common issues

SymptomLikely causeFix
No webhooks receivedURL not configured or inactiveCheck Webhook Settings in portal; send a test event
Signature always failsBody parsed before verifyRead raw body; see Signature Verification
Intermittent duplicatesSlow handler + timeoutReturn 2xx within 8 seconds; process async
Events stop after burstRate limit (300/min)Scale consumer; batch processing
HTTPS rejected at savePrivate or local URLUse a public HTTPS endpoint (e.g. ngrok for dev)
Test your endpoint: Use "Send test event" in Webhook Settings to validate URL, TLS, and signature handling before going live.