From 1a5aad11466981c7468ae77def8a6e184e7b133b Mon Sep 17 00:00:00 2001 From: kzangeli Date: Thu, 29 Oct 2026 18:41:14 +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. The compose snippet in the README shows the same value. - `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 --- README.ja.md | 2 +- README.md | 2 +- docker-compose/common.yml | 2 +- services | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.ja.md b/README.ja.md index 277dc06..d4a1727 100644 --- a/README.ja.md +++ b/README.ja.md @@ -308,7 +308,7 @@ iot-agent: - IOTA_PROVIDER_URL=http://iot-agent:4041 - IOTA_JSON_LD_CONTEXT=http://context/user-context.jsonld - IOTA_FALLBACK_TENANT=openiot - - IOTA_MULTI_CORE=true + - IOTA_MULTI_CORE=false ``` `iot-agent` コンテナは、Orion Context Broker の存在に依存し、MongoDB データベースを使用して、デバイスの diff --git a/README.md b/README.md index cf31e3c..3a29da4 100644 --- a/README.md +++ b/README.md @@ -300,7 +300,7 @@ iot-agent: - IOTA_PROVIDER_URL=http://iot-agent:4041 - IOTA_JSON_LD_CONTEXT=http://context/user-context.jsonld - IOTA_FALLBACK_TENANT=openiot - - IOTA_MULTI_CORE=true + - IOTA_MULTI_CORE=false ``` The `iot-agent` container relies on the presence of the Orion Context Broker and uses a MongoDB database to hold device diff --git a/docker-compose/common.yml b/docker-compose/common.yml index 7f3d8a7..5f96922 100644 --- a/docker-compose/common.yml +++ b/docker-compose/common.yml @@ -187,7 +187,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 ccf0f78..46ef04c 100755 --- a/services +++ b/services @@ -170,9 +170,9 @@ 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