Search code examples
solanasolana-web3js

Error: 403 Forbidden: Call type exceeds Solana 1.9.13 version limit for max account size


I am trying to get minted editions of a collection, by using the accepted answer of this post below:

How to find all NFTs minted from a v2 candy machine

However when I try to query, I am getting the error as per the title:

Error: 403 Forbidden: Call type exceeds Solana 1.9.13 version limit for max account size.


Solution

  • Have a look at https://www.theindex.io/. Their rpc (https://rpc.theindex.io) works for a limited set of rpc calls getProgramAccounts being one of them.

    from the code at the link posted in the original question replace

    const connection = new Connection('mainnet-beta');
    

    with

    const connection = new Connection('https://rpc.theindex.io', 'finalized');
    

    This worked for me when I got the same error.

    For some background on the issue:

    The linked code uses getProgramAccounts which apparently creates issues for validators. (see the overview from the solana docs here https://docs.solana.com/developing/plugins/geyser-plugins, "Validators under heavy RPC loads, such as when serving getProgramAccounts calls, can fall behind the network.")