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

Vikunja eating memory with large swap enabled on Raspberry Pi #97

Open
DaCHack opened this issue Nov 27, 2023 · 7 comments
Open

Vikunja eating memory with large swap enabled on Raspberry Pi #97

DaCHack opened this issue Nov 27, 2023 · 7 comments

Comments

@DaCHack
Copy link

DaCHack commented Nov 27, 2023

Description

Running Raspberry Pi OS on a RPi4 2GB

Vikunja runs fine under default settings with less than 5% memory usage.
When enabling 2GB of swap for another app I noticed that suddenly Vikunja took 40% of physical memory filling up the entire physical memory. Swap file was not used by the system yet due to swappiness at 0. Still, system got extremely slow so I need to revert back to default settings and disable swap to have all service available to the users again.

Vikunja Frontend Version

0.21.0

Vikunja API Version

0.21.0

Browser and version

Edge

Can you reproduce the bug on the Vikunja demo site?

No

Screenshots

No response

@kolaente
Copy link
Member

Is this about the frontend or API? How are you running Vikunja? Did it use the memory as cache or as actual memory?

@DaCHack
Copy link
Author

DaCHack commented Nov 28, 2023

I am not sure about frontend or API: Both is running as a docker container on my RPi.
I think in htop it was /app/vikunja/vikunja with multiple threads eating the memory - cannot reproduce right now without breaking the system again.
I run both at latest docker images for arm64 as well as linuxserver/mariadb:10.6.13 in the stack.
It was using actual memory.

@kolaente kolaente transferred this issue from go-vikunja/frontend Nov 28, 2023
@kolaente
Copy link
Member

Sounds like a problem of the api. Were you doing anything during that time? Did it happen at a specific time? Anything in the logs when it happened?

@DaCHack
Copy link
Author

DaCHack commented Nov 28, 2023

No, I was not doing anything yet. I occured right after the reboot to enable swap and did not stop until I stopped the containers for vikunja.

The logs show a couple of timeouts from database connections that I assume stem from the large latency when the system was memory flooded (while I do not get why it was slow despite no swap was used...).
Also this occurred as first output after boot which might have the same root cause since eventually vikunja was able to connect:

2023-11-27T21:57:04.02580685Z: CRITICAL	▶ migration/Migrate 002 Migration failed: dial tcp: lookup db on 127.0.0.11:53: no such host
2023-11-27T21:57:05.653843555Z: CRITICAL	▶ migration/Migrate 002 Migration failed: dial tcp 172.22.0.4:3306: connect: connection refused
2023-11-27T21:57:07.051648955Z: CRITICAL	▶ migration/Migrate 002 Migration failed: dial tcp 172.22.0.4:3306: connect: connection refused
2023-11-27T21:57:08.666376493Z: INFO	▶ migration/Migrate 052 Ran all migrations successfully.
2023-11-27T21:57:08.670324654Z: INFO	▶ cmd/func25 054 Vikunja version v0.21.0

@kolaente
Copy link
Member

Does it always happen or only sometimes?

@DaCHack
Copy link
Author

DaCHack commented Nov 29, 2023

It happened on two consecutive boots

@kolaente
Copy link
Member

kolaente commented Dec 1, 2023

Not sure how to reproduce this - I've never noticed this on any of the instances I run myself. Please report back if you can pin it down to something more clearly. I'll keep an eye on it as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants