You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Linux wikijs 6.5.0-5-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.5.13-1 (2023-11-29) x86_64 Linux
What steps will reproduce the bug?
Use any NodeJS Dockercontainer and limit its memory down to any number.
Now check `os.totalmem()` - it will still report the whole memory of the VM/Machine, not the limited memory of the container, but it should report the total available Memory, which in a memory limited container is not the whole Memory of the machine.
How often does it reproduce? Is there a required condition?
Everytime
What is the expected behavior? Why is that the expected behavior?
VM = 12GB RAM
Docker container = 300MB RAM
When I run `os.totalmem()` in the docker-container it reports 12GB RAM.
Depending on the Docker version you might be able to read either /sys/fs/cgroup/memory/memory.limit_in_bytes or /sys/fs/cgroup/memory.max, which contain the container memory limit in bytes as an integer.
MrJithil
added
the
libuv
Issues and PRs related to the libuv dependency or the uv binding.
label
Dec 9, 2023
This is working as expected and currently, we don't have an property which will show the max memory limit in the os module.
You may try with the process.constrainedMemory() || 0 where 0 will be no_limit as a workaround. It would be very helpful, if you can provide the output after running this suggestion.
Version
v18.17.0
Platform
Linux wikijs 6.5.0-5-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.5.13-1 (2023-11-29) x86_64 Linux
What steps will reproduce the bug?
How often does it reproduce? Is there a required condition?
Everytime
What is the expected behavior? Why is that the expected behavior?
What do you see instead?
requarks/wiki#6863
The text was updated successfully, but these errors were encountered: