From 6401b208e09286370a830913af18849dbb3ac441 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piet=20G=C3=B6mpel?= Date: Thu, 18 Dec 2025 11:22:34 +0100 Subject: [PATCH] refactor(OCPP): Reduced default threshold for maximum messages in the message queue from 200.000 to 2.000 . In some systems a high number of messages in the queue could lead to memory issues and high load at startup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Piet Gömpel --- lib/everest/ocpp/lib/ocpp/v16/charge_point_impl.cpp | 2 +- lib/everest/ocpp/lib/ocpp/v2/charge_point.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/everest/ocpp/lib/ocpp/v16/charge_point_impl.cpp b/lib/everest/ocpp/lib/ocpp/v16/charge_point_impl.cpp index 400a819348..4eee46dcb6 100644 --- a/lib/everest/ocpp/lib/ocpp/v16/charge_point_impl.cpp +++ b/lib/everest/ocpp/lib/ocpp/v16/charge_point_impl.cpp @@ -31,7 +31,7 @@ const auto V2G_CERTIFICATE_TIMER_INTERVAL = std::chrono::hours(12); const auto OCSP_REQUEST_TIMER_INTERVAL = std::chrono::hours(12); const auto INITIAL_CERTIFICATE_REQUESTS_DELAY = std::chrono::seconds(60); const auto WEBSOCKET_INIT_DELAY = std::chrono::seconds(2); -const auto DEFAULT_MESSAGE_QUEUE_SIZE_THRESHOLD = 2E5; +const auto DEFAULT_MESSAGE_QUEUE_SIZE_THRESHOLD = 1000; const auto DEFAULT_BOOT_NOTIFICATION_INTERVAL_S = 60; // fallback interval if BootNotification returns interval of 0. const auto DEFAULT_PRICE_NUMBER_OF_DECIMALS = 3; const auto DEFAULT_WAIT_FOR_SET_USER_PRICE_TIMEOUT_MS = 0; diff --git a/lib/everest/ocpp/lib/ocpp/v2/charge_point.cpp b/lib/everest/ocpp/lib/ocpp/v2/charge_point.cpp index 0b7b94ba9a..a1bd17039e 100644 --- a/lib/everest/ocpp/lib/ocpp/v2/charge_point.cpp +++ b/lib/everest/ocpp/lib/ocpp/v2/charge_point.cpp @@ -45,7 +45,7 @@ using namespace std::chrono_literals; namespace ocpp { namespace v2 { -const auto DEFAULT_MESSAGE_QUEUE_SIZE_THRESHOLD = 2E5; +const auto DEFAULT_MESSAGE_QUEUE_SIZE_THRESHOLD = 1000; ChargePoint::ChargePoint(const std::map& evse_connector_structure, std::shared_ptr device_model, std::shared_ptr database_handler,