Bug: Swap memory almost entirely consumed by ddns-updater #405

Closed
opened 2025-11-20 04:23:41 -05:00 by saavagebueno · 4 comments
Owner

Originally created by @TheCarrotStick on GitHub (May 22, 2024).

TLDR: Describe your issue in a one liner here
SWAP space almost entirely consumed by ddns-updater no matter what the swap space is on the system after some time of the container running.

  1. Is this urgent: No
  2. DNS provider(s) you use: cloudflare
  3. Program version: 2.6.0
  4. What are you using to run the container: docker-compose
  5. When running htop I see the container showing as a process called 'app'. When digging into it I see the path /updater/app that helped me to originally identify this was coming from ddns-updater and it was an in-container path. Stopping ddns-updater resolved this. I added the memory limits to the compose file to see if I could limit the app's usage, but it barreled past that so I assume that's not doing much, haha.

Logs:
Nothing unusual in the logs.

Configuration file (remove your credentials!):

{
  "settings": [
    {
      "provider": "cloudflare",
      "zone_identifier": "...",
      "domain": "domain1",
      "host": "@",
      "ttl": 600,
      "token": "...",
      "ip_version": "ipv4"
    },
    {
      "provider": "cloudflare",
      "zone_identifier": "...",
      "domain": "domain2",
      "host": "@",
      "ttl": 600,
      "token": "...",
      "ip_version": "ipv4"
    },
    {
      "provider": "cloudflare",
      "zone_identifier": "...",
      "domain": "domain3",
      "host": "@",
      "ttl": 600,
      "token": "...",
      "ip_version": "ipv4"
    }
  ]
}

  ddns-updater:
    image: qmcgaw/ddns-updater
    container_name: ddns-updater
    restart: always
    security_opt:
      - no-new-privileges:true
    network_mode: bridge
    ports:
      - 7821:7821/tcp
    volumes:
      - $DOCKERDIR/ddns-updater:/updater/data
    environment:
      - CONFIG=
      - PERIOD=5m
      - UPDATE_COOLDOWN_PERIOD=5m
      - PUBLICIP_FETCHERS=all
      - PUBLICIP_HTTP_PROVIDERS=all
      - PUBLICIPV4_HTTP_PROVIDERS=all
      - PUBLICIPV6_HTTP_PROVIDERS=all
      - PUBLICIP_DNS_PROVIDERS=all
      - PUBLICIP_DNS_TIMEOUT=3s
      - HTTP_TIMEOUT=10s
      # Web UI
      - LISTENING_ADDRESS=:7821
      - ROOT_URL=/
      # Backup
      - BACKUP_PERIOD=0 # 0 to disable
      - BACKUP_DIRECTORY=/updater/data
      # Other
      - LOG_LEVEL=debug
      - LOG_CALLER=hidden
      - SHOUTRRR_ADDRESSES=
    healthcheck:
      disable: true
    mem_limit: 256m
    memswap_limit: 0m

Host OS:
Ubuntu 22.04.4 LTS x86_64

Originally created by @TheCarrotStick on GitHub (May 22, 2024). <!-- YOU CAN CHAT THERE EVENTUALLY: https://github.com/qdm12/ddns-updater/discussions --> **TLDR**: *Describe your issue in a one liner here* SWAP space almost entirely consumed by ddns-updater no matter what the swap space is on the system after some time of the container running. 1. Is this urgent: No 2. DNS provider(s) you use: cloudflare 3. Program version: 2.6.0 4. What are you using to run the container: docker-compose 5. When running `htop` I see the container showing as a process called 'app'. When digging into it I see the path /updater/app that helped me to originally identify this was coming from ddns-updater and it was an in-container path. Stopping ddns-updater resolved this. I added the memory limits to the compose file to see if I could limit the app's usage, but it barreled past that so I assume that's not doing much, haha. Logs: Nothing unusual in the logs. Configuration file (**remove your credentials!**): ```json { "settings": [ { "provider": "cloudflare", "zone_identifier": "...", "domain": "domain1", "host": "@", "ttl": 600, "token": "...", "ip_version": "ipv4" }, { "provider": "cloudflare", "zone_identifier": "...", "domain": "domain2", "host": "@", "ttl": 600, "token": "...", "ip_version": "ipv4" }, { "provider": "cloudflare", "zone_identifier": "...", "domain": "domain3", "host": "@", "ttl": 600, "token": "...", "ip_version": "ipv4" } ] } ``` ```yaml ddns-updater: image: qmcgaw/ddns-updater container_name: ddns-updater restart: always security_opt: - no-new-privileges:true network_mode: bridge ports: - 7821:7821/tcp volumes: - $DOCKERDIR/ddns-updater:/updater/data environment: - CONFIG= - PERIOD=5m - UPDATE_COOLDOWN_PERIOD=5m - PUBLICIP_FETCHERS=all - PUBLICIP_HTTP_PROVIDERS=all - PUBLICIPV4_HTTP_PROVIDERS=all - PUBLICIPV6_HTTP_PROVIDERS=all - PUBLICIP_DNS_PROVIDERS=all - PUBLICIP_DNS_TIMEOUT=3s - HTTP_TIMEOUT=10s # Web UI - LISTENING_ADDRESS=:7821 - ROOT_URL=/ # Backup - BACKUP_PERIOD=0 # 0 to disable - BACKUP_DIRECTORY=/updater/data # Other - LOG_LEVEL=debug - LOG_CALLER=hidden - SHOUTRRR_ADDRESSES= healthcheck: disable: true mem_limit: 256m memswap_limit: 0m ``` Host OS: Ubuntu 22.04.4 LTS x86_64
Author
Owner

@qdm12 commented on GitHub (May 23, 2024):

That's strange, what does docker stats say? Mine uses 9.3MB of ram. Does it increase slowly over time?
How did you identify using htop that ddns-updater was at fault for the swap space being used all up?

By the way, I just changed it from /updater/app to /updater/ddns-updater in commit 8e09cd6342 since that was indeed unclear in terms of process name

@qdm12 commented on GitHub (May 23, 2024): That's strange, what does `docker stats` say? Mine uses 9.3MB of ram. Does it increase slowly over time? How did you identify using htop that ddns-updater was at fault for the swap space being used all up? By the way, I just changed it from `/updater/app` to `/updater/ddns-updater` in commit 8e09cd634232c33185888d424f7ed489bfe18032 since that was indeed unclear in terms of process name
Author
Owner

@TheCarrotStick commented on GitHub (May 24, 2024):

Appreciate that, it was definitely a bit of a chase to figure out where that was initially, haha. Looks like it calmed back down now. Once my alert goes off again I'll visit docker stats again.
Screenshot 2024-05-24 at 3 04 45 PM

@TheCarrotStick commented on GitHub (May 24, 2024): Appreciate that, it was definitely a bit of a chase to figure out where that was initially, haha. Looks like it calmed back down now. Once my alert goes off again I'll visit `docker stats` again. <img width="903" alt="Screenshot 2024-05-24 at 3 04 45 PM" src="https://github.com/qdm12/ddns-updater/assets/28305230/d5286542-cad1-4c3f-b358-ca86529486b3">
Author
Owner

@TheCarrotStick commented on GitHub (Jun 3, 2024):

Hey, I think I've resolved my swap space issue, it wasn't the ddns-updater app, but it looked to be gluetun. I added
DOT=off to get rid of unbound and my swap space has drastically improved with only 10% usage at most across my entire stack of containers. Thank you!

@TheCarrotStick commented on GitHub (Jun 3, 2024): Hey, I think I've resolved my swap space issue, it wasn't the ddns-updater app, but it looked to be gluetun. I added `DOT=off` to get rid of unbound and my swap space has drastically improved with only 10% usage at most across my entire stack of containers. Thank you!
Author
Owner

@qdm12 commented on GitHub (Jun 14, 2024):

That's strange. Unbound does use memory for sure, due to its blocklists mostly, but it should stay at around 500MB.
This is changing soon (after next release) with https://github.com/qdm12/gluetun/issues/137 and memory is a bit reduced as far as I've seen. Feel free to subscribe to that issue 😉

@qdm12 commented on GitHub (Jun 14, 2024): That's strange. Unbound does use memory for sure, due to its blocklists mostly, but it should stay at around 500MB. This is changing soon (after next release) with https://github.com/qdm12/gluetun/issues/137 and memory is a bit reduced as far as I've seen. Feel free to subscribe to that issue 😉
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/ddns-updater#405