linuxserver / docker-obsidian

GNU General Public License v3.0
191 stars 15 forks source link

[BUG] Uses approx 3GB of RAM on Raspberry Pi and crashes #6

Closed alx-xlx closed 6 months ago

alx-xlx commented 6 months ago

Is there an existing issue for this?

Current Behavior

As soon as I start the container, the RAM usage of the device shoots up. So much so that the device has no more RAM and it crashes. I have to then restart the device. And the loop continues.

I had to stop the container to copy paste the logs.

Expected Behavior

No response

Steps To Reproduce

  1. Running it on Raspberry Pi 4B - 4GB RAM
  2. Running 1 vault
  3. Total 90 extensions installed.

Environment

- OS: Raspberry Pi OS 64bit
- How docker service was installed:
installed using the following

CPU architecture

arm64

Docker creation

services:
  obsidian:
    image: lscr.io/linuxserver/obsidian:latest
    container_name: obsidian
    security_opt:
      - seccomp:unconfined #optional
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Asia/Kolkata
    volumes:
      - /home/pi/data/obsidian:/config
    ports:
      - 6010:3000
      - 6011:3001
    devices:
      - /dev/dri:/dev/dri #optional
    shm_size: "1gb"
    restart: unless-stopped

Container logs

pi@raspi-4-32-services:~ $ docker logs obsidian
[migrations] started
[migrations] no migrations found
───────────────────────────────────────

      ██╗     ███████╗██╗ ██████╗
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝

   Brought to you by linuxserver.io
───────────────────────────────────────

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    1000
User GID:    1000
───────────────────────────────────────

[custom-init] No custom files found, skipping...
_XSERVTransmkdir: ERROR: euid != 0,directory /tmp/.X11-unix will not be created.

Xvnc KasmVNC 1.2.0 - built May 11 2024 18:55:42
Copyright (C) 1999-2018 KasmVNC Team and many others (see README.me)
See http://kasmweb.com for information on KasmVNC.
Underlying X server release 12014000, The X.Org Foundation

[ls.io-init] done.
Obt-Message: Xinerama extension is not present on the server
 2024-05-13 12:52:22,467 [INFO] websocket 0: got client connection from 127.0.0.1
 2024-05-13 12:52:22,516 [PRIO] Connections: accepted: @192.168.0.122_1715584942.468623::websocket
 2024-05-13 12:58:36,887 [PRIO] Connections: closed: @192.168.0.122_1715584942.468623::websocket (Clean disconnection)
 2024-05-13 12:58:37,489 [INFO] websocket 1: got client connection from 127.0.0.1
 2024-05-13 12:58:37,518 [PRIO] Connections: accepted: @192.168.0.122_1715585317.490451::websocket
 2024-05-13 13:00:13,207 [PRIO] Connections: closed: @192.168.0.122_1715585317.490451::websocket (Clean disconnection)
 2024-05-13 13:00:13,779 [INFO] websocket 2: got client connection from 127.0.0.1
 2024-05-13 13:00:13,807 [PRIO] Connections: accepted: @192.168.0.122_1715585413.779994::websocket
 2024-05-13 13:11:05,654 [PRIO] Connections: closed: @192.168.0.122_1715585413.779994::websocket (Clean disconnection)
 2024-05-13 13:11:50,113 [INFO] websocket 3: got client connection from 127.0.0.1
 2024-05-13 13:11:50,149 [PRIO] Connections: accepted: @192.168.0.122_1715586110.114633::websocket
 2024-05-13 13:17:17,390 [PRIO] Connections: closed: @192.168.0.122_1715586110.114633::websocket (Clean disconnection)
 2024-05-13 13:17:17,796 [INFO] websocket 4: got client connection from 127.0.0.1
 2024-05-13 13:17:17,826 [PRIO] Connections: accepted: @192.168.0.122_1715586437.797157::websocket
 2024-05-13 13:18:03,000 [PRIO] Connections: closed: @192.168.0.122_1715586437.797157::websocket (Clean disconnection)
 2024-05-13 13:20:04,124 [INFO] websocket 5: got client connection from 127.0.0.1
 2024-05-13 13:20:04,152 [PRIO] Connections: accepted: @192.168.0.122_1715586604.125165::websocket
 2024-05-13 13:31:56,363 [PRIO] Connections: closed: @192.168.0.122_1715586604.125165::websocket (Clean disconnection)
 2024-05-13 14:47:49,036 [INFO] websocket 6: got client connection from 127.0.0.1
 2024-05-13 14:47:49,064 [PRIO] Connections: accepted: @192.168.0.122_1715591869.37014::websocket
 2024-05-13 15:13:18,991 [PRIO] Connections: closed: @192.168.0.122_1715591869.37014::websocket (Clean disconnection)
[migrations] started
[migrations] no migrations found
usermod: no changes
───────────────────────────────────────

      ██╗     ███████╗██╗ ██████╗
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝

   Brought to you by linuxserver.io
───────────────────────────────────────

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    1000
User GID:    1000
───────────────────────────────────────

[custom-init] No custom files found, skipping...
[ls.io-init] done.
_XSERVTransmkdir: Owner of /tmp/.X11-unix should be set to root

Xvnc KasmVNC 1.2.0 - built May 11 2024 18:55:42
Copyright (C) 1999-2018 KasmVNC Team and many others (see README.me)
See http://kasmweb.com for information on KasmVNC.
Underlying X server release 12014000, The X.Org Foundation

Obt-Message: Xinerama extension is not present on the server
[migrations] started
[migrations] no migrations found
usermod: no changes
───────────────────────────────────────

      ██╗     ███████╗██╗ ██████╗
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝

   Brought to you by linuxserver.io
───────────────────────────────────────

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    1000
User GID:    1000
───────────────────────────────────────

[custom-init] No custom files found, skipping...
[ls.io-init] done.
_XSERVTransmkdir: Owner of /tmp/.X11-unix should be set to root

Xvnc KasmVNC 1.2.0 - built May 11 2024 18:55:42
Copyright (C) 1999-2018 KasmVNC Team and many others (see README.me)
See http://kasmweb.com for information on KasmVNC.
Underlying X server release 12014000, The X.Org Foundation

Obt-Message: Xinerama extension is not present on the server
[migrations] started
[migrations] no migrations found
usermod: no changes
───────────────────────────────────────

      ██╗     ███████╗██╗ ██████╗
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝

   Brought to you by linuxserver.io
───────────────────────────────────────

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    1000
User GID:    1000
───────────────────────────────────────

[custom-init] No custom files found, skipping...
[ls.io-init] done.
(EE) 
Fatal server error:
(EE) Server is already active for display 1
    If this server is no longer running, remove /tmp/.X1-lock
    and start again.
(EE) 
Openbox-Message: Failed to open the display from the DISPLAY environment variable.
_XSERVTransmkdir: Owner of /tmp/.X11-unix should be set to root

Xvnc KasmVNC 1.2.0 - built May 11 2024 18:55:42
Copyright (C) 1999-2018 KasmVNC Team and many others (see README.me)
See http://kasmweb.com for information on KasmVNC.
Underlying X server release 12014000, The X.Org Foundation

Obt-Message: Xinerama extension is not present on the server
 2024-05-15 11:04:59,287 [INFO] websocket 0: got client connection from 127.0.0.1
 2024-05-15 11:04:59,331 [PRIO] Connections: accepted: @192.168.0.121_1715751299.294389::websocket
 2024-05-15 11:05:22,535 [PRIO] Connections: closed: @192.168.0.121_1715751299.294389::websocket (Clean disconnection)
 2024-05-15 11:05:24,567 [INFO] websocket 1: got client connection from 127.0.0.1
 2024-05-15 11:05:24,595 [PRIO] Connections: accepted: @192.168.0.121_1715751324.568125::websocket
 2024-05-15 11:13:07,075 [PRIO] Connections: closed: @192.168.0.121_1715751324.568125::websocket (Clean disconnection)
X connection to :1 broken (explicit kill or server shutdown).
[migrations] started
[migrations] no migrations found
usermod: no changes
───────────────────────────────────────

      ██╗     ███████╗██╗ ██████╗
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝

   Brought to you by linuxserver.io
───────────────────────────────────────

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    1000
User GID:    1000
───────────────────────────────────────

[custom-init] No custom files found, skipping...
[ls.io-init] done.
_XSERVTransmkdir: Owner of /tmp/.X11-unix should be set to root

Xvnc KasmVNC 1.2.0 - built May 11 2024 18:55:42
Copyright (C) 1999-2018 KasmVNC Team and many others (see README.me)
See http://kasmweb.com for information on KasmVNC.
Underlying X server release 12014000, The X.Org Foundation

Obt-Message: Xinerama extension is not present on the server
 2024-05-15 11:14:12,644 [INFO] websocket 0: got client connection from 127.0.0.1
 2024-05-15 11:14:12,692 [PRIO] Connections: accepted: @192.168.0.121_1715751852.646444::websocket
[migrations] started
[migrations] no migrations found
usermod: no changes
───────────────────────────────────────

      ██╗     ███████╗██╗ ██████╗
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝

   Brought to you by linuxserver.io
───────────────────────────────────────

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    1000
User GID:    1000
───────────────────────────────────────

[custom-init] No custom files found, skipping...
[ls.io-init] done.
(EE) 
Fatal server error:
(EE) Server is already active for display 1
    If this server is no longer running, remove /tmp/.X1-lock
    and start again.
(EE) 
Openbox-Message: Failed to open the display from the DISPLAY environment variable.
_XSERVTransmkdir: Owner of /tmp/.X11-unix should be set to root

Xvnc KasmVNC 1.2.0 - built May 11 2024 18:55:42
Copyright (C) 1999-2018 KasmVNC Team and many others (see README.me)
See http://kasmweb.com for information on KasmVNC.
Underlying X server release 12014000, The X.Org Foundation

Obt-Message: Xinerama extension is not present on the server
 2024-05-15 11:25:06,968 [INFO] websocket 0: got client connection from 127.0.0.1
 2024-05-15 11:25:07,034 [PRIO] Connections: accepted: @192.168.0.121_1715752506.970968::websocket
[migrations] started
[migrations] no migrations found
usermod: no changes
───────────────────────────────────────

      ██╗     ███████╗██╗ ██████╗
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝

   Brought to you by linuxserver.io
───────────────────────────────────────

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    1000
User GID:    1000
───────────────────────────────────────

[custom-init] No custom files found, skipping...
[ls.io-init] done.
_XSERVTransmkdir: Owner of /tmp/.X11-unix should be set to root

Xvnc KasmVNC 1.2.0 - built May 11 2024 18:55:42
Copyright (C) 1999-2018 KasmVNC Team and many others (see README.me)
See http://kasmweb.com for information on KasmVNC.
Underlying X server release 12014000, The X.Org Foundation

Obt-Message: Xinerama extension is not present on the server
 2024-05-15 11:50:26,375 [INFO] websocket 0: got client connection from 127.0.0.1
 2024-05-15 11:50:26,494 [PRIO] Connections: accepted: @192.168.0.121_1715754026.450887::websocket
 2024-05-15 11:51:50,338 [PRIO] Connections: closed: @192.168.0.121_1715754026.450887::websocket (Clean disconnection)
[migrations] started
[migrations] no migrations found
usermod: no changes
───────────────────────────────────────

      ██╗     ███████╗██╗ ██████╗
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝

   Brought to you by linuxserver.io
───────────────────────────────────────

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    1000
User GID:    1000
───────────────────────────────────────

[custom-init] No custom files found, skipping...
[ls.io-init] done.
_XSERVTransmkdir: Owner of /tmp/.X11-unix should be set to root

Xvnc KasmVNC 1.2.0 - built May 11 2024 18:55:42
Copyright (C) 1999-2018 KasmVNC Team and many others (see README.me)
See http://kasmweb.com for information on KasmVNC.
Underlying X server release 12014000, The X.Org Foundation

Obt-Message: Xinerama extension is not present on the server
[migrations] started
[migrations] no migrations found
usermod: no changes
───────────────────────────────────────

      ██╗     ███████╗██╗ ██████╗
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝

   Brought to you by linuxserver.io
───────────────────────────────────────

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    1000
User GID:    1000
───────────────────────────────────────

[custom-init] No custom files found, skipping...
[ls.io-init] done.
_XSERVTransmkdir: Owner of /tmp/.X11-unix should be set to root

Xvnc KasmVNC 1.2.0 - built May 11 2024 18:55:42
Copyright (C) 1999-2018 KasmVNC Team and many others (see README.me)
See http://kasmweb.com for information on KasmVNC.
Underlying X server release 12014000, The X.Org Foundation

Obt-Message: Xinerama extension is not present on the server
[migrations] started
[migrations] no migrations found
usermod: no changes
───────────────────────────────────────

      ██╗     ███████╗██╗ ██████╗
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝

   Brought to you by linuxserver.io
───────────────────────────────────────

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    1000
User GID:    1000
───────────────────────────────────────

[custom-init] No custom files found, skipping...
[ls.io-init] done.
_XSERVTransmkdir: Owner of /tmp/.X11-unix should be set to root

Xvnc KasmVNC 1.2.0 - built May 11 2024 18:55:42
Copyright (C) 1999-2018 KasmVNC Team and many others (see README.me)
See http://kasmweb.com for information on KasmVNC.
Underlying X server release 12014000, The X.Org Foundation

Obt-Message: Xinerama extension is not present on the server
X connection to :1 broken (explicit kill or server shutdown).
[migrations] started
[migrations] no migrations found
usermod: no changes
───────────────────────────────────────

      ██╗     ███████╗██╗ ██████╗
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝

   Brought to you by linuxserver.io
───────────────────────────────────────

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    1000
User GID:    1000
───────────────────────────────────────

[custom-init] No custom files found, skipping...
[ls.io-init] done.
_XSERVTransmkdir: Owner of /tmp/.X11-unix should be set to root

Xvnc KasmVNC 1.2.0 - built May 11 2024 18:55:42
Copyright (C) 1999-2018 KasmVNC Team and many others (see README.me)
See http://kasmweb.com for information on KasmVNC.
Underlying X server release 12014000, The X.Org Foundation

Obt-Message: Xinerama extension is not present on the server
X connection to :1 broken (explicit kill or server shutdown).
[migrations] started
[migrations] no migrations found
usermod: no changes
───────────────────────────────────────

      ██╗     ███████╗██╗ ██████╗
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝

   Brought to you by linuxserver.io
───────────────────────────────────────

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    1000
User GID:    1000
───────────────────────────────────────

[custom-init] No custom files found, skipping...
[ls.io-init] done.
_XSERVTransmkdir: Owner of /tmp/.X11-unix should be set to root

Xvnc KasmVNC 1.2.0 - built May 11 2024 18:55:42
Copyright (C) 1999-2018 KasmVNC Team and many others (see README.me)
See http://kasmweb.com for information on KasmVNC.
Underlying X server release 12014000, The X.Org Foundation

Obt-Message: Xinerama extension is not present on the server
X connection to :1 broken (explicit kill or server shutdown).
[migrations] started
[migrations] no migrations found
usermod: no changes
───────────────────────────────────────

      ██╗     ███████╗██╗ ██████╗
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝

   Brought to you by linuxserver.io
───────────────────────────────────────

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    1000
User GID:    1000
───────────────────────────────────────

[custom-init] No custom files found, skipping...
[ls.io-init] done.
_XSERVTransmkdir: Owner of /tmp/.X11-unix should be set to root

Xvnc KasmVNC 1.2.0 - built May 11 2024 18:55:42
Copyright (C) 1999-2018 KasmVNC Team and many others (see README.me)
See http://kasmweb.com for information on KasmVNC.
Underlying X server release 12014000, The X.Org Foundation

Obt-Message: Xinerama extension is not present on the server
 2024-05-15 19:32:05,523 [INFO] websocket 0: got client connection from 127.0.0.1
 2024-05-15 19:32:05,566 [PRIO] Connections: accepted: @192.168.0.121_1715781725.524680::websocket
X connection to :1 broken (explicit kill or server shutdown).
 2024-05-15 19:32:46,153 [PRIO] Connections: closed: @192.168.0.121_1715781725.524680::websocket (Clean disconnection)
[migrations] started
[migrations] no migrations found
usermod: no changes
───────────────────────────────────────

      ██╗     ███████╗██╗ ██████╗
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝

   Brought to you by linuxserver.io
───────────────────────────────────────

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    1000
User GID:    1000
───────────────────────────────────────

[custom-init] No custom files found, skipping...
[ls.io-init] done.
_XSERVTransmkdir: Owner of /tmp/.X11-unix should be set to root

Xvnc KasmVNC 1.2.0 - built May 11 2024 18:55:42
Copyright (C) 1999-2018 KasmVNC Team and many others (see README.me)
See http://kasmweb.com for information on KasmVNC.
Underlying X server release 12014000, The X.Org Foundation

Obt-Message: Xinerama extension is not present on the server
[migrations] started
[migrations] no migrations found
usermod: no changes
───────────────────────────────────────

      ██╗     ███████╗██╗ ██████╗
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝

   Brought to you by linuxserver.io
───────────────────────────────────────

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    1000
User GID:    1000
───────────────────────────────────────

[custom-init] No custom files found, skipping...
[ls.io-init] done.
_XSERVTransmkdir: Owner of /tmp/.X11-unix should be set to root

Xvnc KasmVNC 1.2.0 - built May 11 2024 18:55:42
Copyright (C) 1999-2018 KasmVNC Team and many others (see README.me)
See http://kasmweb.com for information on KasmVNC.
Underlying X server release 12014000, The X.Org Foundation

Obt-Message: Xinerama extension is not present on the server
X connection to :1 broken (explicit kill or server shutdown).
github-actions[bot] commented 6 months ago

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

alx-xlx commented 6 months ago

in this gif you will see that the memory usage gradually increases as soon as I start the container.

vncviewer_oI8lOMh3s2

nBIhsDEPkM

j0nnymoe commented 6 months ago

Does the same happen if you don't have 90 extensions installed?

alx-xlx commented 6 months ago

No sir, no. It was the obsidian-livesync it was causing this issue, it was taking too much RAM while the syncing was going on. Maybe the author will someday optimize the extension. As soon as I stopped the extension the RAM usage remained around 1.2gb.