ArkEcosystem / core

The ARK Core Blockchain Framework. Check https://learn.ark.dev for more information.
https://ark.io
MIT License
338 stars 286 forks source link

Too Many Requests #4804

Closed demicantrell closed 10 months ago

demicantrell commented 10 months ago

Hello.

I'm developing local core node and periodically facing with error:

{'statusCode': 429, 'error': 'Too Many Requests', 'message': 'Too Many Requests'}

How can I increase or disable requests limit?

sebastijankuzner commented 10 months ago

You can disable RateLimiter by setting environment variable (.env file) to CORE_API_RATE_LIMIT_DISABLED=true. Additional RateLimit setting can be applied. Please take a look into following code section.

Documentation is available here, with full ENV variables list.

demicantrell commented 10 months ago

You can disable RateLimiter by setting environment variable (.env file) to CORE_API_RATE_LIMIT_DISABLED=true. Additional RateLimit setting can be applied. Please take a look into following code section.

Documentation is available here, with full ENV variables list.

Hi. Thanks for your hint. In the end, it turned out so that mainnet.env file editing did not bring the proper result. Therefore, I just changed the following lines in the defaults.js

points: process.env.CORE_API_RATE_LIMIT_USER_LIMIT || 1000000,
duration: process.env.CORE_API_RATE_LIMIT_USER_EXPIRES || 0,

So now everything works like a charm.