Why your Solana RPC returns 429 Too Many Requests, and what to do
HTTP 429 means "slow down", but on Solana it covers several different problems: too many requests per IP, too many of one method, too many connections, or a method your endpoint simply does not serve. They need different fixes. Here is how to tell which one you hit.
The public endpoint's published limits
For https://api.mainnet-beta.solana.com, the Solana docs list these limits:
| Limit | Value |
|---|---|
| Requests per 10 seconds per IP | 100 |
| Requests per 10 seconds per IP for a single RPC method | 40 |
| Concurrent connections per IP | 40 |
| Connection rate per 10 seconds per IP | 40 |
| Data per 30 seconds | 100 MB |
The docs also say the public endpoints are not meant for production applications. The per-method limit is the one people trip over: 40 getAccountInfo calls in 10 seconds is only 4 a second, so a loop that polls a few accounts hits it long before the overall 100.
Keyed providers (Helius, QuickNode, Alchemy, Triton and others) have their own limits per plan, often counted in requests per second or in credits, where heavy methods cost more than light ones. Their dashboards show which one you are on.
Read the response headers
The response tells you more than the status code. Asking the public endpoint for a token's largest accounts:
curl -s -i https://api.mainnet-beta.solana.com -X POST -H "content-type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"getTokenLargestAccounts","params":["EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"]}'
What came back on 2026-11-17 (headers trimmed to the relevant ones):
HTTP/1.1 429 Too Many Requests
retry-after: 10
x-ratelimit-tier: free
x-ratelimit-method-limit: 0
x-ratelimit-method-remaining: -1
x-ratelimit-rps-limit: 250
x-ratelimit-rps-remaining: 235
x-ratelimit-conn-limit: 40
x-ratelimit-conn-remaining: 35
x-ratelimit-connrate-limit: 40
x-ratelimit-connrate-remaining: 35
{"jsonrpc":"2.0","error":{"code":429,"message":"Too many requests for a specific RPC call"},"id":1}
This was the first request of the minute, and plenty of the general budget was left (rps-remaining: 235). The telling line is x-ratelimit-method-limit: 0: the public endpoint allows zero calls of this method. The retry-after: 10 is a trap here, because waiting ten seconds and retrying gets the same answer forever. Header names vary between providers; look at what yours sends with curl -i.
The five usual causes
- A method your plan does not serve. As above. The body usually says "for a specific RPC call". Fix: use an endpoint that serves it (the free plans of the main providers serve
getTokenLargestAccounts), not a retry. - A burst of one method. Polling or a
Promise.allover hundreds of accounts. Fix: batch withgetMultipleAccounts(up to 100 accounts per call), or subscribe over WebSocket instead of polling. - Too many requests per second overall. Fix: a queue with a steady rate, or spread the calls over more than one endpoint.
- Too many open connections. Each new HTTP client or WebSocket counts. Fix: reuse one client; do not create a
Connectionper request. - Credits used up. Keyed plans with a monthly budget start refusing when it runs out, often with 429. Fix: check the provider dashboard; heavy methods like
getProgramAccountscost the most.
A retry that knows when to give up
Honour Retry-After when it is there, back off with jitter when it is not, cap the tries, and stop at once when the endpoint says the method is not served. Save as retry.mjs; it runs on Node 18+ with no packages:
// retry.mjs: a JSON-RPC call that waits and retries on 429, honouring Retry-After.
const url = process.env.SOLANA_RPC_URL || "https://api.mainnet-beta.solana.com";
const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
export async function rpc(method, params = [], { tries = 4 } = {}) {
for (let attempt = 1; ; attempt++) {
const res = await fetch(url, {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({ jsonrpc: "2.0", id: 1, method, params }),
signal: AbortSignal.timeout(10_000),
});
const body = await res.json().catch(() => null);
const limited = res.status === 429 || body?.error?.code === 429;
if (!limited) {
if (body?.error) throw new Error(`${method}: RPC error ${body.error.code}: ${body.error.message}`);
return body.result;
}
// A method limit of 0 means this endpoint does not serve the method at all on your plan. Waiting cannot help.
if (res.headers.get("x-ratelimit-method-limit") === "0") throw new Error(`${method}: not served by this endpoint (method limit 0)`);
if (attempt >= tries) throw new Error(`${method}: still rate limited after ${tries} tries: ${body?.error?.message ?? "HTTP 429"}`);
// Retry-After is in seconds when the server sends it; otherwise back off 0.5 s, 1 s, 2 s ... plus jitter.
const retryAfter = Number(res.headers.get("retry-after")) * 1000;
const wait = retryAfter > 0 ? retryAfter : 500 * 2 ** (attempt - 1) + Math.random() * 250;
console.error(`${method}: 429, waiting ${Math.round(wait)} ms (try ${attempt}/${tries})`);
await sleep(wait);
}
}
console.log("slot", await rpc("getSlot"));
try {
// The public endpoint refuses this method for everyone: retrying cannot help.
await rpc("getTokenLargestAccounts", ["EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"], { tries: 2 });
} catch (e) {
console.log(e.message);
}
Against the public endpoint it returns in about half a second instead of sitting through a pointless ten-second wait:
slot 470716958
getTokenLargestAccounts: not served by this endpoint (method limit 0)
Against a test server that answers 429 twice and then succeeds, the backoff path does its job:
getSlot: 429, waiting 704 ms (try 1/4)
getSlot: 429, waiting 1105 ms (try 2/4)
slot 123
Find out before production does
solana-rpc-bench runs the common methods against each of your endpoints one at a time, counts every 429, and probes whether each endpoint serves the heavier methods (getTokenLargestAccounts, filtered getProgramAccounts, getRecentPrioritizationFees, or your own list). Keys are redacted in the output.
SOLANA_RPC_URLS="https://api.mainnet-beta.solana.com,https://your-provider-url/..." npx github:blixvip/solana-rpc-bench --rounds 1 --delay 500
supports:
getTokenLargestAccounts no: HTTP 429 (code 429): Too many requests for a specific RPC call
getProgramAccounts (filters) yes (297 ms)
getRecentPrioritizationFees yes (96 ms)
Once you know your endpoints, spread the load across them with failover: How to stop Solana RPC 429 errors walks through that with solana-rpc-pool.