in-solana by Supanode

429 Too Many Requests

The RPC endpoint is rejecting your requests because you have exceeded its rate limit. This is an HTTP-level response, not a Solana protocol error.

Common causes

  1. Public RPC rate limits. The free public endpoints (api.mainnet-beta.solana.com) have strict per-IP rate limits, typically 10-40 requests per second depending on the method.
  2. Provider plan limits. Paid RPC providers enforce limits based on your plan — requests per second, compute units, or monthly request quotas.
  3. Burst traffic. Polling loops, parallel requests, or startup bursts can exceed limits even if average throughput is within bounds.
  4. Shared IP. If you are behind a NAT or proxy, multiple users share the same IP and its rate limit.

How to fix

  1. Add exponential backoff. When you receive a 429, wait before retrying. Double the wait time on each consecutive 429.
  2. Reduce request frequency. Batch requests with getMultipleAccounts instead of calling getAccountInfo in a loop.
  3. Cache responses. Many RPC responses (epoch info, block height, version) change slowly and can be cached for seconds.
  4. Upgrade your RPC plan. Free and low-tier plans are not designed for production workloads. Dedicated providers like Supanode offer higher limits or flat-rate pricing without per-request metering.

How to prevent

  • Use WebSocket subscriptions (accountSubscribe, slotSubscribe) instead of polling.
  • Use getProgramAccounts with filters instead of fetching accounts one by one.
  • Spread requests across multiple RPC endpoints.
  • Monitor your usage against your provider’s limits.
async function fetchWithBackoff(fn: () => Promise<any>, maxRetries = 5) {
  for (let i = 0; i < maxRetries; i++) {
    try {
      return await fn();
    } catch (e: any) {
      if (e?.status === 429 && i < maxRetries - 1) {
        await new Promise((r) => setTimeout(r, 1000 * 2 ** i));
        continue;
      }
      throw e;
    }
  }
}

Rate limits by endpoint type

EndpointTypical limit
Public RPC (api.mainnet-beta.solana.com)10-40 req/s per IP
Free tier (most providers)10-25 req/s
Paid shared RPC50-500 req/s
Dedicated nodeNo rate limit (hardware-bound)

Exact limits vary by provider and method. Heavy methods like getProgramAccounts often have stricter limits than lightweight ones like getSlot.

FAQ

Does 429 mean my transaction failed? No. A 429 means the request was not processed at all. If you were sending a transaction, it was never submitted. Retry after a delay.

Which methods trigger rate limits fastest? Heavy methods: getProgramAccounts, getBlock (full), getTransaction, and any method returning large responses. Lightweight methods like getSlot or getHealth rarely trigger limits on their own.

Can I get unlimited RPC access? Dedicated nodes have no rate limits — you are limited only by the node’s hardware. Some providers also offer flat-rate shared plans without per-request metering.

How do I know my rate limit? Check your provider’s documentation or dashboard. The public RPC does not advertise its limits. Some providers include Retry-After or X-RateLimit-* headers in 429 responses.

Error text variants

  • 429 Too Many Requests
  • Rate limit exceeded
  • Too many requests

Updated: