0

How to check the rate limits of concrete RPC? It works until some time and then starts throwing an error. I suspect it's the rate limits

I connect to the remote node. For example wss://acala-rpc.dwellir.com.

It is interesting that when this RPC throws an error, all wss://*-rpc.dwellir.com throws the same error. So looks like it's some generic mechanism. I assume it simply bans by IP.

With other remote RPC endpoints situation is the same.

These 2 logs are consecutive:

2022-10-09 19:27:04          API-WS: disconnected from ws://127.0.0.1:9944: 1006:: connection failed
2022-10-09 19:27:04          API-WS: disconnected from wss://acala-rpc.dwellir.com: 1006:: connection failed
1
  • Sounds like you need to check that with dwellir.com, your RPC provider. I don't think this rate limiting is enforced by Substrate itself. Oct 19, 2022 at 9:30

1 Answer 1

0

Ultimately you're at the behest of that service provider's internal logic of how they deal with load and spam - there is no set way to respond (e.g. if you 500 error, 404, actively ban ip, redirect it into a blackhole etc).

I'd recommend:

  • use a throttle like bottleneck to prevent yourself from getting banned
  • Not using the acala dwellir rpc endpoint, if i remember correctly, that one is highly limited
  • writing some code (like a connection singleton) which reuses the same wss connection and reconnects to different endpoint if you're booted off

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.