UpSnap: [BUG] Memory leak

I am not sure what I did wrong while setting up upsnap but after a few days it starts hogging all ram in it’s lxc container.

I tried deploying it with docker and running the binary as is. Screenshot from 2023-12-09 17-39-50 on my previous attempt I allocated 2gbs of ram to container.

Here’s the current docker-compose:

version: "3"
services:
  upsnap:
    container_name: upsnap
    image: ghcr.io/seriousm4x/upsnap:4
    network_mode: host
    restart: unless-stopped
    volumes:
      - ./data:/app/pb_data
    # # To use a non-root user, create the mountpoint first (mkdir data) so that it has the right permission.
    # user: 1000:1000
    environment:
      - TZ=Asia/Almaty # Set container timezone for cron schedules
    #   - UPSNAP_INTERVAL=@every 10s # Sets the interval in which the devices are pinged
      - UPSNAP_SCAN_RANGE=10.0.0.1/24 # Scan range is used for device discovery on local network
    #   - UPSNAP_WEBSITE_TITLE=Custom name # Custom website title
    # # dns is used for name resolution during network scan
    dns:
      - 1.1.1.1
      - 1.0.0.1
    # # you can change the listen ip:port inside the container like this:
    # entrypoint: /bin/sh -c "./upsnap serve --http 0.0.0.0:5000"
    # healthcheck:
    #   test: curl -fs "http://localhost:5000/api/health" || exit 1
    #   interval: 10s
    # # or install custom packages for shutdown
    # entrypoint: /bin/sh -c "apk update && apk add --no-cache <YOUR_PACKAGE> && rm -rf /var/cache/apk/* && ./upsnap serve --http 0.0.0.0:8090"

About this issue

  • Original URL
  • State: closed
  • Created 7 months ago
  • Comments: 21 (9 by maintainers)

Commits related to this issue

Most upvoted comments

Here, after 1 hour uptime:

Screenshot from 2023-12-14 10-29-34

15 hours uptime: Screenshot from 2023-12-15 00-35-02