429 issues on Solana/metaplex

3.3k views Asked by At

I thought Solana/Metaplex etc should be able to handle large numbers of transactions in quick succession. I just wrote a load test to do 50 mints of an existing SPL token (that has metaplex token-data associated with it)

In my code I dont specify any particular node/rpc - rather just the cluster i.e. testnet

What should I be doing here ?

{"name":"Error","message":"failed to get info about account 2fvtsp6U6iDVhJvox5kRpUS6jFAStk847zATX3cpsVD8: Error: 429 Too Many Requests:  {\"jsonrpc\":\"2.0\",\"error\":{\"code\": 429, \"message\":\"Too many requests from your IP, contact your app developer or [email protected].\"}, \"id\": \"76627a31-4522-4ebb-ae22-5861fa6781f0\" } \r\n","stack":"Error: failed to get info about account 2fvtsp6U6iDVhJvox5kRpUS6jFAStk847zATX3cpsVD8: Error: 429 Too Many Requests:  {\"jsonrpc\":\"2.0\",\"error\":{\"code\": 429, \"message\":\"Too many requests from your IP, contact your app developer or [email protected].\"}, \"id\": \"76627a31-4522-4ebb-ae22-5861fa6781f0\" } \r\n\n    at Connection.getAccountInfo (/Users/ffff/dev/walsingh/TOKENPASS/tpass-graphql/graphql/node_modules/@metaplex/js/node_modules/@solana/web3.js/lib/index.cjs.js:5508:13)\n    at runMicrotasks (<anonymous>)\n    at processTicksAndRejections (node:internal/process/task_queues:96:5)\n    at async Token.getAccountInfo (
1

There are 1 answers

1
Jacob Creech On

The 429 issue you are running into is a RPC rate limit. Testnet has the following rate limits at the time of writing:

  • Maximum number of requests per 10 seconds per IP: 100
  • Maximum number of requests per 10 seconds per IP for a single RPC: 40
  • Maximum concurrent connections per IP: 40
  • Maximum connection rate per 10 seconds per IP: 40
  • Maximum amount of data per 30 second: 100 MB

You probably ran into one of these limits. The general recommendation is to go get access to one of the RPCs without rate limits, as the public endpoints are not meant for testing how many transactions you can get through.

Quicknode, Triton, and Genesysgo provide RPC infra to use.