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

51202: Twilsock : CPS, Too many requests


ERROR: 51202

error-51202 page anchor
ERROR

This error occurs when your application sends too many requests over Twilsock in a short period. Twilio enforces connection establishment and upstream request limits for SDK traffic to protect service quality. In Conversations and Sync, those limits include up to 110 new or re-established connections per second per subaccount, up to 500 upstream requests per second per connection, and up to 20,000 upstream requests per second per subaccount.

Possible causes

possible-causes page anchor
  • Your client is sending reads, writes, updates, or other upstream requests faster than the allowed rate.
  • Your application is repeatedly creating or re-establishing SDK connections, which can exceed connection establishment limits.
  • Multiple clients in the same subaccount are generating enough combined traffic to exceed the shared subaccount request budget.
  • Your application is polling or retrying too aggressively instead of relying on SDK events, callbacks, or synchronized state updates.
  • Throttle, debounce, or batch client operations so you send fewer requests over each connection.
  • Keep SDK connections open and reuse them where possible instead of repeatedly creating new clients or reconnecting. This follows directly from Twilio's documented connection establishment limits.
  • Implement retries with exponential backoff after a throttled request. Requests rejected with a rate limit response are safe to retry. (help.twilio.com(link takes you to an external page))
  • Reduce unnecessary fetching. Prefer SDK events, callbacks, subscriptions, and Sync fanout over polling when you need state changes or status updates.
  • Review your expected traffic against the documented limits for your product. If your production load is expected and you still need more capacity after optimization, contact Support.

Additional resources

additional-resources page anchor