[SOLVED] I'm suddenly being rate limited

Hi there - my app is suddenly being rated limited - started happening sometime this afternoon.

The code is unchanged in about a week, i’m not doing anything new and I seem to be well under the limits for the pro plan.

The three servers I’m using are…


Thanks, Bret

what is the rate limit error message that you get?

{“code”:141,“error”:"Too many requests to Web3API from this particular client, the clients needs to wait before sending more requests. This can be adjusted using Moralis.settings.setAPIRateLimit. Read More: https://docs.moralis.io/moralis-server/web3-sdk/rate-limit."}

All my servers run this at the start…

Moralis.settings.setAPIRateLimit({anonymous:3500, authenticated:3500, windowMs:60000});

it looks like you have a cloud function name setAPIRateLimit_Max that does that

Yes - i call it at the start of every run

how do you know when you called it or not, you could add that rate limit code without a cloud function and it will be called automatically when server restarts

It’s part of my pre-run validation. It ran for about 8 hours before it hit the issue.
I’ve just recalled it mid-run for both servers to see it it just got unset somehow.

I’ll let you know is the app sees this again…

Is this how i would do that?

yes, you can do it like that, with that first line

Fantastic - I totally missed that :roll_eyes:

Thanks again for the stellar help!

You can close this call