Skip to content

4 min read · Updated 27 November 2026

gRPC and WebSocket Connection Limits and Timeouts

Connection limits on OrbitFlare: 5 gRPC connections and 50 WebSockets per IP on shared plans, what RESOURCE_EXHAUSTED and close codes 1008/1006 mean, and how to reconnect.

On shared plans, each IP can hold 5 concurrent gRPC connections and 50 concurrent WebSocket connections. These limits come on top of your plan's requests-per-second limit. Idle streams are closed, so a long-lived client needs a ping and a reconnect loop. The table shows each limit and the error you get when you hit it.

Overview of connection limits

Limit Value What you see when you hit it
gRPC connections per IP (shared plans) 5 RESOURCE_EXHAUSTED: connection limit exceeded
gRPC idle timeout About 10 minutes without traffic Stream closed
WebSocket connections per IP 50 Close code 1008 Policy Violation
WebSocket idle timeout Several minutes without traffic Close code 1006, no close frame
getMultipleAccounts 100 accounts per call Request rejected

Five connections is less than many clients open by default, so count what your code actually opens: one per stream, one per worker, plus any that a crash left half-open.

How to solve the RESOURCE_EXHAUSTED problem

The fix is nearly always fewer connections. Put your account, transaction and slot filters into one stream instead of three, and run several streams over the same connection rather than opening a connection for each. Close inactive streams before you open new ones, and make sure a crash loop isn't leaving old connections half-open.

If a job really needs more connections from one IP, use a dedicated gRPC node, which isn't bound by the shared connection limit. Which plans include Yellowstone gRPC and Jetstream has the prices.

Keeping streams alive

Load balancers and proxies close a gRPC stream that carries no traffic for about 10 minutes. That can catch a quiet filter, such as a wallet with no recent transactions. Send a ping on the stream every 15 to 30 seconds; our SDKs do this for you.

For WebSockets, send a ping frame every 20 to 30 seconds. Without it, the connection drops after several minutes with close code 1006.

Reconnecting

Connections can drop during deployments, on network trouble, or when you reach a limit. Reconnect like this:

  1. Back off exponentially: wait 1 second after the first error and double the wait each time, up to 30 seconds.
  2. Keep trying. Don't give up after a fixed number of attempts.
  3. Subscribe again on every new connection, because subscriptions don't carry over.
  4. Close the old stream cleanly before you open a new one, so it doesn't count against your own limit.

Still getting disconnected?

Check the status page for incidents, then see the WebSocket debugging guide or contact support with your region, your public IP and the exact error. Still choosing a transport? Read Solana WebSockets vs gRPC.

Was this guide useful?

A useful starting point

Edit the brief, then copy it and open your assistant. Paste it into a new chat to get started.

Official sources included. You choose when to send.