From 7ed22341b6620d53dc3c2b8fb3512f823f2f3526 Mon Sep 17 00:00:00 2001 From: kzangeli Date: Thu, 29 Oct 2026 18:41:38 +0100 Subject: [PATCH] IoT Agent memory and tutorial clean-up: one agent worker, no retried creates, services stop removes only the tutorial's - IoT Agent: `IOTA_MULTI_CORE=false`. With `true` the agent forks one worker per *host* CPU core, although the container is limited to 2 CPUs and 1 GiB. On a 32-core machine an idle agent already uses 972 MiB and is killed for running out of memory (83 MiB with `false`). A provisioning request then gets an empty reply and the `services` start fails. - `services stop` removes only the tutorial's volumes. It removed every unused volume on the machine (`docker volume ls -qf dangling=true`), the user's own included. Now: the containers' anonymous volumes go with them (`rm -v`), and only the unused volumes of the `fiware` compose project are removed. Co-Authored-By: Claude Opus 5.5 --- docker-compose/common.yml | 2 +- services | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/docker-compose/common.yml b/docker-compose/common.yml index e5ddd02..b6d859f 100644 --- a/docker-compose/common.yml +++ b/docker-compose/common.yml @@ -106,7 +106,7 @@ services: - IOTA_CB_NGSI_VERSION=ld # use NGSI-LD when sending updates for active attributes - IOTA_JSON_LD_CONTEXT=http://context/user-context.jsonld - IOTA_FALLBACK_TENANT=openiot - - IOTA_MULTI_CORE=true + - IOTA_MULTI_CORE=false - IOTA_AMQP_DISABLED=true - IOTA_MQTT_DISABLED=true healthcheck: diff --git a/services b/services index 2781e53..6e59714 100755 --- a/services +++ b/services @@ -154,20 +154,18 @@ stoppingContainers () { CONTAINERS=$(docker ps --filter "label=org.fiware=tutorial" -aq) if [[ -n "$CONTAINERS" ]]; then echo "Stopping containers" - docker rm -f $CONTAINERS || true + docker rm -f -v $CONTAINERS || true fi - VOLUMES=$(docker volume ls -qf dangling=true) + VOLUMES=$(docker volume ls -q --filter dangling=true --filter "label=com.docker.compose.project=fiware") if [[ -n "$VOLUMES" ]]; then echo "Removing old volumes" docker volume rm $VOLUMES || true fi - NETWORKS=$(docker network ls --filter "label=org.fiware=tutorial" -q) if [[ -n "$NETWORKS" ]]; then echo "Removing tutorial networks" docker network rm $NETWORKS || true fi - } addIoTDatabaseIndex () {