Skip to contentSkip to navigationSkip to topbar
Page toolsOn this page
Looking for more inspiration?Visit the

51126: Twilsock: DNC limit has been reached


ERROR: 51126

error-51126 page anchor
ERROR

This error means a client connected through Twilsock hit a service limit. Twilio Conversations SDK clients use a WebSocket connection to receive real-time events, and Twilio enforces limits on concurrent connections, connection establishment rate, and upstream request rate. Review your client lifecycle and push registration flow to reduce unnecessary reconnects, duplicate registrations, and stale client state.

Possible causes

possible-causes page anchor
  • Your application creates new SDK client instances too often instead of letting the existing client reconnect automatically after network loss or when the app returns to the foreground.
  • Your application registers for push notifications repeatedly without checking whether the device token changed.
  • Your application does not unregister push notifications when a different chat identity signs in, which can leave old registrations associated with the previous user.
  • Your account or subaccount is approaching or exceeding Twilio Conversations limits for concurrent connections, connection establishment, or upstream requests.
  • The affected Conversations Service still has push notification bindings for endpoints or identities that are no longer active.
  • Keep a single SDK client active for each signed-in user session. Let the SDK reconnect automatically during normal network interruptions and when the app moves between background and foreground.
  • Register for push notifications at application start, persist the current device token, and re-register only when the token changes.
  • Unregister push notifications before switching to a different chat identity. Release objects tied to the old client before you create a new client instance.
  • Review your connection pattern against the published Conversations limits for concurrent connections, connection establishment rate, and upstream request rate. Reduce bursty reconnects, duplicate client initialization, and unnecessary upstream traffic.
  • Inspect the Service Binding records for the affected Conversations Service and remove bindings that no longer belong to an active device or identity.

Additional resources

additional-resources page anchor