Failed running cloud function getLogsByAddress for user undefined

Hello.

When using the getLogsByAddress method - I get an answer with a blank result:

total: 0
page: 0
page_size: 500
result

I broke my head for a long time until I opened the server dashboard, and didn’t find logs. There I saw such a mistake:

Failed running cloud function getLogsByAddress for user undefined with:
Input:{"address":"0xca143ce32fe78f1f7019d7d551a6402fc5350c73","chain":"bsc","topic0":"0x0d3648bd0f6ba80134a33ba9275ac585d9d315f0ad8355cddefde31afa28d0e9","topic1":"0x000000000000000000000000bb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c","topic2":"0x00000000000000000000000086fdb97dfacd6ddd9c397dc204712a43b1ee6150"}
Error: {"message":"Too many requests to Web3 API 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.","code":141}

2022-03-10T21:48:16.785Z - Error: Too many requests to Web3 API 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.
    at fetch (/moralis-server/lib/cloud-code/plugins/helpers/apiUtils.js:179:26)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

Ok. Now I have a questions …

I check this page https://docs.moralis.io/moralis-server/web3-sdk/rate-limit and see this:

The values are set by default:

  • anonymous: 30
  • authenticated: 50
  • windowMs: 60000 (1 minute)
  1. Do I understand correctly, are these limits on the Starter tariff?
  2. Do I understand correctly that for me now (Starter tariff) a limit in 50 requests per minute? How I can check it? Because I think I didn’t get 50 requests per minute.
  3. Where I can find my total requests to the Web3 API?
  4. What limits then on the Pro tariff?

Thanks.

Great guru @cryptokid please help me.

Thanks.

You have to set that limit in cloud code to what values you want. You only have to copy that line that sets the rate limit in your cloud code, and update the values to your needs. This rate limit is not related to a paid plan. Only to stop some users to make a lot of requests to your server.

So there is no limits? But where I can see statistics or requests?

there are default limits that you can change in particular for when web3api calls are used with a server (you can also make web3api requests without using a server by using REST HTTP requests or by using moralisSecret in nodejs)

you can see the overall usage in admin interface

1 Like

Really? Can I use for getLogsByAddress?

Where? ) Can u send me screenshot?

“account settings” -> “payment” -> usage

1 Like

Thanks.

Really? Can I use for getLogsByAddress?

you can use for any web3api function