Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rate limitation override #69

Open
PanosChtz opened this issue Mar 25, 2021 · 4 comments
Open

Rate limitation override #69

PanosChtz opened this issue Mar 25, 2021 · 4 comments

Comments

@PanosChtz
Copy link

PanosChtz commented Mar 25, 2021

I have a python program to make many JSON requests at http://localhost:3001/insight-api/tx/
However after a while I won't get any more replies, but get
{'status': 429, 'error': 'Rate limit exceeded'}
Also dashcore-node log shows
warn: Rate limited: { name: '::ffff:127.0.0.1', type: 'normal', visits: 10801 }
Only way to recover is to kill the node and restart it.
Any way to get around this?

@thephez
Copy link

thephez commented Mar 25, 2021

@PanosChtz Haven't tried this myself, but I think this should help you: https://github.com/dashevo/insight-api#query-rate-limit

@PanosChtz
Copy link
Author

@thephez Thanks - however I tried both whitelisting localhost and disabling the query rate limiter entirely, but for some reason I still get the same error! Here's my dashcore-node.json..

{
  "network": "livenet",
  "port": 3001,
  "services": [
    "@dashevo/insight-api",
    "@dashevo/insight-ui",
    "dashd",
    "web"
  ],
  "servicesConfig": {
    "dashd": {
      "spawn": {
        "datadir": "./data",
        "exec": "/home/user/.dashcore/dashd"
      }
    },
      "insight-api": {
    "disableRateLimiter": true,
    "rateLimiterOptions": {
      "whitelist": ["::ffff:127.0.0.1"]}
  }
  }
}

@PanosChtz
Copy link
Author

PanosChtz commented Mar 25, 2021

@thephez
Copy link

thephez commented Mar 25, 2021

Hmm, not sure then. It looks like that's what's being done in mn-bootstrap so it seems like it should work. Maybe someone else can shed some light on this. At least you have a workaround for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants