EatTheBlocks Forum

DEX-> 'Too Many Requests' during deployment in Ropsten

Dear all,

After completing the DEX project from the course ‘6-Figure Blockchain Developer’, I tried to deploy the smart contracts in Ropsten but I always get the same error message:

I assumed it might be due to all the requests launched in parallel by using the Promise.all command, so I changed all these requests into sequential executions (await sentence1, await sentence 2…). I also reduced the number of accounts to 3. However, I still get the ‘too many requests message’.

The error normally happens during the creation of fake trades/orders, so one alternative would be commenting all these steps and do it manually with the front-end, but I was wondering whether anyone experienced the same issue and if there is any alternative to still launch all the trades/orders without getting such as error?

I believe it’s a limitation of the Ethereum API you are using. You exceeded the usage limit.
You can either create a new project and use the new API key or try on another testnet.

I am actually using Infura, so it is likely to be the case you mentioned (I think they introduced a limitation of 10 RPC requests/sec from last year).

I’ll do another migrations file without running all promises in parallel or even adding some setIntervals to avoid too many requests.

1 Like