IPFS: error: status 429 Too Many Requests

Hello everyone,

I’m building an app that use IPFS and I keep getting error: status 429 when I request relatively big amount of hash (~ 50+) is it the expected behaviour? I’m getting “general users” objects first that have an IPFS link containing a base64 image (mediaData)

I’m using ipfs-mini and here is the code:

   const users = [user1,user2,user3]
   // get tokenIds IPFS
    users.forEach(async (elem) => {
        const uri = await dispatch('score/getTokenUri', { user: elem}, { root: true })
        // get IPFS datas
        const generalData = JSON.parse(await dispatch('ipfs/getData', { hash: uri.substring(28), type: 'object' }, { root: true }))
        const mediaData = await dispatch('ipfs/getData', { hash: generalData.file.substring(28), type: 'media' }, { root: true })

        tokens.push({
            generalUri: uri,
            tokenId: parseInt(elem, 16),
            generalData
        })
    })

Thanks a lot!

Hi @k4rtl, and welcome to the Infura community! Yes, if you are sending through a large amount of hash data, you will likely see that “Too Many Requests” error. I would suggest trying to send the data through in smaller chunks if that’s possible.

1 Like

Thanks a lot for your answer! It’s actually a problem to read the uploaded data, would it be possible to have the exact limitations? For example, after 100 call I’m unable to query anything for 5 minutes. Just wanted to know so i can see if splitting in chunks would be possible.

Thanks a lot for your help!

I’m not sure to understand if I’m getting limited for x time if I send too much request in a very short time.

Would it be possible to send “large” request but on smaller chunks? Thanks a lot

This thread from a few years ago might help you out with figuring that out - it sounds like bandwidth may play into the potential size, or there are some services that can help.