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

51124: Twilsock: Too many connections


ERROR: 51124

error-51124 page anchor
ERROR

Your application has opened more Twilsock connections for your account than the current limit allows. Twilsock is the persistent connection layer used by Twilio client-side SDKs such as Chat, Sync, and Notify. This error usually indicates that your application is creating too many simultaneous client connections or is not closing unused sessions correctly.

Possible causes

possible-causes page anchor
  • Your application is creating a new client instance each time a page loads, refreshes, or rerenders.
  • Users are signed in from many browser tabs, devices, or sessions at the same time.
  • Your application is not shutting down unused SDK clients when users log out or navigate away.
  • Connection retry logic is creating duplicate connections after network interruptions.
  • Load tests, bots, or misconfigured clients are generating more concurrent connections than your account is expected to use.
  • Review how your application initializes Twilio SDK clients and make sure it does not create duplicate client instances unnecessarily.
  • Reuse an existing client connection when possible instead of creating a new one for each action or view.
  • Close or shut down SDK clients when they are no longer needed, especially during logout, session expiration, or application teardown.
  • Check your retry and reconnect logic to confirm that temporary network failures do not leave old connections active while opening new ones.
  • Validate expected usage across tabs, browsers, and devices to make sure the connection volume matches your application's design.
  • If your traffic is expected and legitimate, contact Support to discuss your account limits.

Additional resources

additional-resources page anchor