Error 429 too many requests

hi, i have an error 429,
I cannot upload more than 4 files at a time, I have this error:

response: Response {
size: 0,
timeout: 0,
[Symbol(Body internals)]: { body: [PassThrough], disturbed: true, error: null },
[Symbol(Response internals)]: {
url: ‘https://ipfs.infura.io:5001/api/v0/add?stream-channels=true&progress=false’,
status: 429,
statusText: ‘Too Many Requests’,
headers: [Headers],
counter: 0
}
}

how to fix this?

1 Like

Having exactly the same error and need to rerun the upload many times until it uploads correctly…

Is there a way to not get rate-limited with such a low volume? In my case I wanted to upload 25 images and I had to retry at least 10 times… frustrating

Hi @Erwann_Martin & @drifter and welcome to our Infura community.

We have currently rate limits on the gateway and they depend on the load. How exactly are you trying to upload these files? Any specific code or tool you could share with us?

Sure! I’m running Metaplex locally and they handle NFT uploads via Infura programmatically.
Here’s some metaplex code so you can check the integration.
It makes two requests to this endpoint https://ipfs.infura.io:5001/api/v0/pin/add

@Flaviu Hopefully you can shed some light into this, as I’m planning on uploading 5 to 10K images with it.

Thank you

@drifter

The issue was raised to our team and it appears that our IPFS gateway is hitting rate limits at this moment - they are dynamic depending on the number of requests and load.

Our team is working to provide a meaningful error message and suggestions for backoff slots between the uploads.

The only suggestion I can give right now is to try uploading the NFTs with a timeout between them (try 30s - 1min).

@drifter try to increase the sleep, it should make it a bit better: await sleep(10000);