Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

too much virtual memery usage #5654

Open
1 task done
PikuZheng opened this issue Feb 25, 2025 · 0 comments
Open
1 task done

too much virtual memery usage #5654

PikuZheng opened this issue Feb 25, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@PikuZheng
Copy link

πŸ“‘ I have found these related issues/pull requests

it looks like #3788 and #5568 but not exactly the same

πŸ›‘οΈ Security Policy

Description

I often encounter the web interface fails to load or shows a blank screen as described in #5568 (comment) .
I noticed that this issue is exacerbated when disk performance is slow. after some investigation, I think it has something to do with memory consumption. uptime-kuma uses about 0.7G physical memory, but uses a lot of virtual memory.
Since no frequent disk reads and writes were found, I think there may be a potential memory consumption problem or memory leak.

here I take Server1 as an example (about 99 ping monitors):

  PID  PPID USER     STAT   VSZ %VSZ CPU %CPU COMMAND
13429 13407 root     S    21.3g5067%   1   0% node server/server.js

after restart

37099 37077 root     S    11.3g2691%   0  12% node server/server.js

same issues also exist in other servers:

  PID  PPID USER     STAT   VSZ %VSZ CPU %CPU COMMAND
20825 20813 root     S    21.3g 555%   1   1% node server/server.js
  PID  PPID USER     STAT   VSZ %VSZ CPU %CPU COMMAND
 2870  2846 root     S    11.3g 295%   1   0% node server/server.js

the best case is with 5 monitors and 1.23.13 with sqlite, but still consumes a lot of memory:

  PID  PPID USER     STAT   VSZ %VSZ CPU %CPU COMMAND
 3960  3922 root     S    10.9g 285%   1   4% node server/server.js
localhost:~# uptime
 11:38:06 up 49 days, 23:13,  0 users,  load average: 0.12, 0.08, 0.02

after restart:

  PID  PPID USER     STAT   VSZ %VSZ CPU %CPU COMMAND
30120 30103 root     S    1001m  25%   1   2% node server/server.js

πŸ‘Ÿ Reproduction steps

run it in a VM with 4GB of RAM and wait

πŸ‘€ Expected behavior

expected memory usage is stable

πŸ˜“ Actual Behavior

memory usage grows till web ui slow

🐻 Uptime-Kuma Version

both 2.0.0 and 1.23.13

πŸ’» Operating System and Arch

official container

🌐 Browser

Chrome 133.0.6943.127

πŸ–₯️ Deployment Environment

  • Runtime: docker standalone 26.1.5
  • Database: embedded mariadb
  • Filesystem used to store the database on: ext4
  • number of monitors: 99

πŸ“ Relevant log output

@PikuZheng PikuZheng added the bug Something isn't working label Feb 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant