Losing connectivity to public RPC nodes

Hey everyone, first time posting and hope someone can help in any way!

We have a service which fetches smart contracts data from various DEXs on each block. Basically, the script performs read operations on various token pairs and does some offline calculation. When we run it, it works for several blocks and after that it silently fails. Pretty much gets stuck without any errors. We tested this both locally and on a VPS (digital ocean) and we are getting same results. What’s even worse, if we try a simple script to fetch token balance, which has no relation to service, connection is not even established.

My questions are:

  • are there any rate limits on public nodes?
  • is it better to run our own node to do these kind of things (we are setting up one atm to test it out)
  • any recommendations to try something else, ie to use different URL for each block

If it helps anyone, service is written in Node and we are using ethers.js to connect to RPC.
The same service is working without any issues on a different L2 which is similar to Core so its really weird we are seeing this behavior.

Any helps is really appreciated!
Dusan

2 Likes

Hi @theHour

Thanks fro reaching out. to answer your question:

  1. Yes, the public RPC for Core does have a rate limit of 600 per ip per minute.

  2. To get around the rate limit one option is to either run your own RPC node or you can go with third parties RPC like ankr. Following is the list of available third party RPCs

2 Likes

@Maryam

As soon as I posted the question, I’ve managed to get the error that we are hitting rate limits indeed!
The problem was we didn’t get any proper error initially, so that’s why I asked the question as well. :slight_smile:

Thanks for the feedback, really appreciate it.

2 Likes