diff --git a/include/Configuration.h b/include/Configuration.h index f8673edb..cd925dcc 100644 --- a/include/Configuration.h +++ b/include/Configuration.h @@ -22,7 +22,7 @@ #define MQTT_MAX_CERT_STRLEN 2560 #define INV_MAX_NAME_STRLEN 31 -#define INV_MAX_COUNT 10 +#define INV_MAX_COUNT 5 #define INV_MAX_CHAN_COUNT 6 #define CHAN_MAX_NAME_STRLEN 31 diff --git a/src/WebApi_prometheus.cpp b/src/WebApi_prometheus.cpp index aee56847..ab925f72 100644 --- a/src/WebApi_prometheus.cpp +++ b/src/WebApi_prometheus.cpp @@ -27,7 +27,7 @@ void WebApiPrometheusClass::loop() void WebApiPrometheusClass::onPrometheusMetricsGet(AsyncWebServerRequest* request) { try { - auto stream = request->beginResponseStream("text/plain; charset=utf-8", 40960); + auto stream = request->beginResponseStream("text/plain; charset=utf-8", 4096 * INV_MAX_COUNT); // TODO helge: check if this calculation is correct stream->print("# HELP opendtu_build Build info\n"); stream->print("# TYPE opendtu_build gauge\n"); diff --git a/src/WebApi_ws_live.cpp b/src/WebApi_ws_live.cpp index 102ad53d..b5146455 100644 --- a/src/WebApi_ws_live.cpp +++ b/src/WebApi_ws_live.cpp @@ -69,7 +69,7 @@ void WebApiWsLiveClass::loop() String buffer; // free JsonDocument as soon as possible { - DynamicJsonDocument root(40960); + DynamicJsonDocument root(4096 * INV_MAX_COUNT); // TODO helge: check if this calculation is correct JsonVariant var = root; generateJsonResponse(var); serializeJson(root, buffer);