Skip to content
Docs/Limits & Error Codes
Docs/Reference

Limits & Error Codes

System resource limits, edge rate limits, quotas, and protocol error codes reference.

Connection & Subscription Limits

ResourceValueBehavior When Exceeded
Channels per Connection50 channelsSubscription rejected with wire error 4300. Socket remains open.
Channels per App5000 channelsNew subscriptions rejected with wire error 4300. Resubscribes still succeed.
Heartbeat Interval120 secondsClient sends pusher:ping when idle; server responds with pusher:pong.
Hibernation State Size16 KiBMax state storage per hibernating socket. Closes with 4200 if exceeded.

Edge Rate Limiters

Rate limiting is enforced at Cloudflare Anycast edge locations:

LimiterThresholdAction When Exceeded
New Connection Limiter500 handshakes / 10s per teamHTTP 429 Too Many Requests
Channel Subscribe Limiter20 subscriptions / 10s per socketWire event pusher:error (4301)
Client Event Limiter50 client events / 10s per socket, 1000 / 10s per appWire event pusher:error (4301)

Concurrency Quotas (Socketo Cloud)

PlanConcurrent SocketsAction When Exceeded
Tier 11,000WebSocket close code 4004 (Over quota)
Tier 23,000WebSocket close code 4004 (Over quota)
Tier 35,000WebSocket close code 4004 (Over quota)

Broadcast Billing (Socketo Cloud)

PlanMonthly FeeIncluded Broadcasts / MonthOverage
Tier 1$92M$1 per additional million
Tier 2$2012M$1 per additional million
Tier 3$3630M$1 per additional million

One event counts as one broadcast, no matter how many subscribers receive it. Subscriber fan-out is never billed separately.

Presence Channel Limits

ResourceMaximum ThresholdAction When Exceeded
Members per Presence Channel100 unique user IDsSubscription rejected with 4300
Presence User ID Length128 charactersSubscription rejected with 4300
Presence User Object Size1 KiB (1,024 bytes)Subscription rejected with 4300

Payload & Request Limits

  • Event Payload Size: Maximum 10 KiB (10,240 bytes) per event payload.
  • Batch Event Size: Maximum 10 events per POST /apps/:id/batch_events request.
  • Target Channels: Maximum 100 channels targeted in a single trigger request.

Protocol Feature Support Matrix

FeatureSupport StatusSpecification Reference
Public ChannelsSupportedPusher Protocol v7
Private ChannelsSupportedHMAC-SHA256 authorization
Presence ChannelsSupportedRoster awareness (max 100 members)
Client Events (client-*)SupportedPrivate & presence channels
User Sign-in (pusher:signin)SupportedConnection-level identity #server-to-user-<id>
Direct User Events (sendToUser)SupportedDispatched to pusher.user.bind()
Outbound WebhooksSupportedOccupancy, presence, and client events
Encrypted Channels (private-encrypted-*)UnsupportedEnd-to-end TweetNaCl encryption not implemented
Cache Channels (cache-*)UnsupportedMessage caching on channel join not implemented
Watchlist Events (pusher:watchlist)UnsupportedUser status monitoring outside channels not implemented

Error Codes Reference

HTTP Status Codes

CodeMeaning
400 Bad RequestMalformed JSON payload or missing WebSocket upgrade headers.
401 UnauthorizedInvalid HMAC signature or timestamp expired (> 600s).
403 ForbiddenApplication is disabled or suspended.
404 Not FoundApplication ID not found or non-existent endpoint.
429 Too Many RequestsEdge rate limit threshold reached.

WebSocket Close Codes

CodeReason
4000Application requires SSL / TLS connection.
4001Application key not found.
4003Application is suspended or disabled.
4004Application has exceeded concurrent connection quota.
4006Invalid protocol version string format.
4007Unsupported protocol version (expected 7).
4008No protocol version supplied in handshake query string.
4009Connection unauthorized.
4100Server over capacity; reconnect with exponential backoff.
4200Reconnect immediately (also produced when user connection is terminated).
4201Pong heartbeat not received within activity timeout.
4202Closed after prolonged inactivity.

Wire Error Events (pusher:error)

CodeMeaning
4009Channel authorization signature failed verification.
4300Channel limit reached (presence roster full, channel name invalid, or payload exceeded).
4301Socket rate limit exceeded (event flood or subscription flood).