oliverw / miningcore

Miningcore is a high-performance Mining Pool Software for Linux and Windows.
https://store.miningcore.pro
MIT License
717 stars 662 forks source link

MonitorMode: False #1621

Open david739 opened 1 year ago

david739 commented 1 year ago

hello, the system shows an error out of nowhere, does anyone know why, everything was fine until yesterday

[2023-02-10 11:21:02.1601] [I] [IpRateLimitMiddleware] Request get:/api/pools from IP xxx has been blocked, quota 8/1s exceeded by 1. Blocked by rule *, TraceIdentifier 0HMOBA1FF08VN:0000000F. MonitorMode: False

jon4hz commented 1 year ago

That isn't an error. Some client just hit the rate limit you configured for the API.

david739 commented 1 year ago

hi, I have configured the api, where can I change it please?

jon4hz commented 1 year ago

Somewhere in your api config you probably have:

"rules": [
    {
        "Endpoint": "*",
        "Period": "1s",
        "Limit": 8
    }
]

Just change the limit to something higher and you'll be fine.

david739 commented 1 year ago
hi, I didn't find any apiconfig in the miningcore folder, I only have config.schema.json there, and if it's not that, where should I look for the file

"ApiConfig": { "type": [ "object", "null" ], "properties": { "adminIpWhitelist": { "type": [ "array", "null" ], "items": { "type": [ "string", "null" ] } }, "adminPort": { "type": [ "integer", "null" ] }, "enabled": { "type": "boolean" }, "legacyNullValueHandling": { "type": "boolean" }, "listenAddress": { "type": [ "string", "null" ] }, "metricsIpWhitelist": { "type": [ "array", "null" ], "items": { "type": [ "string", "null" ] } }, "metricsPort": { "type": [ "integer", "null" ] }, "port": { "type": "integer" }, "rateLimiting": { "$ref": "#/definitions/ApiRateLimitConfig" }, "tls": { "$ref": "#/definitions/ApiTlsConfig" } } }, "ApiRateLimitConfig": { "type": [ "object", "null"

jon4hz commented 1 year ago

the api config is part of the cluster config, probably named just "config.json". The file where you put all the other configuration for your pools, database, etc.

david739 commented 1 year ago

I already have it, I overlooked it, thanks a lot