-
Notifications
You must be signed in to change notification settings - Fork 683
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
ENOENT: no such file or directory, open '/sys/fs/cgroup/memory/memory.limit_in_bytes / aarch64 #693
Comments
Thanks for pointing this out. We originally built it for our own Docker environment and nobody complained until now. I guess it's time to make it more resilient. |
@jekusz I'd like to hotfix this, but it would probably lead to invalid memory readings for you, unless you run your containers unlimited in Docker. (Basically, we'd fall back to system readings when the memory cgroups are unavailable.) Would this work for you? https://archlinuxarm.org/forum/viewtopic.php?f=15&t=12086#p57035 |
@mnmkng This works 100% appreciate the help a lot. |
The `testMemoryLimitModified` was failing in cgroup2 environment because of missing `/sys/fs/cgroup/memory/memory.limit_in_bytes`. In the cgroup2 environment a new file should be checked instead -- `/sys/fs/cgroup/memory.max`. This commit checks both files: 1. `/sys/fs/cgroup/memory/memory.limit_in_bytes` from the first version of cgroup 2. `/sys/fs/cgroup/memory.max` from the second `cat`ing one of the files succeeds in both environments Similar issues: 1. oracle/docker-images#1939 2. apify/crawlee#693
The `testMemoryLimitModified` was failing in cgroup2 environment because of missing `/sys/fs/cgroup/memory/memory.limit_in_bytes`. In the cgroup2 environment a new file should be checked instead -- `/sys/fs/cgroup/memory.max`. This commit checks both files: 1. `/sys/fs/cgroup/memory/memory.limit_in_bytes` from the first version of cgroup 2. `/sys/fs/cgroup/memory.max` from the second `cat`ing one of the files succeeds in both environments Similar issues: 1. oracle/docker-images#1939 2. apify/crawlee#693
The `testMemoryLimitModified` was failing in cgroup2 environment because of the missing `/sys/fs/cgroup/memory/memory.limit_in_bytes` file. In the cgroup2 environment a new file should be checked instead -- `/sys/fs/cgroup/memory.max`. This commit intrdocues changes to `cat` both files: 1. `/sys/fs/cgroup/memory/memory.limit_in_bytes` from the first version of cgroup 2. `/sys/fs/cgroup/memory.max` from the second Similar issues: 1. oracle/docker-images#1939 2. apify/crawlee#693
The `testMemoryLimitModified` was failing in cgroup2 environment because of the missing `/sys/fs/cgroup/memory/memory.limit_in_bytes` file. In the cgroup2 environment a new file should be checked instead -- `/sys/fs/cgroup/memory.max`. This commit intrdocues changes to `cat` both files: 1. `/sys/fs/cgroup/memory/memory.limit_in_bytes` from the first version of cgroup 2. `/sys/fs/cgroup/memory.max` from the second Similar issues: 1. oracle/docker-images#1939 2. apify/crawlee#693
…#4375) * Fix `CmdModifierTest#testMemoryLimitModified` in cgroup2 environment. The `testMemoryLimitModified` was failing in cgroup2 environment because of the missing `/sys/fs/cgroup/memory/memory.limit_in_bytes` file. In the cgroup2 environment a new file should be checked instead -- `/sys/fs/cgroup/memory.max`. This commit intrdocues changes to `cat` both files: 1. `/sys/fs/cgroup/memory/memory.limit_in_bytes` from the first version of cgroup 2. `/sys/fs/cgroup/memory.max` from the second Similar issues: 1. oracle/docker-images#1939 2. apify/crawlee#693 * Use `docker info` to distinguish cgroup version * Use `DockerClientFactory.instance().client()` instead of `memoryLimitedRedis.getDockerClient()`
Start with giving us feedback
Done
Now describe the bug
src/utils.js -> readPromised('/sys/fs/cgroup/memory/memory.limit_in_bytes'),
Is causing:
Main failed: ENOENT: no such file or directory, open '/sys/fs/cgroup/memory/memory.limit_in_bytes
To Reproduce
Run apify inside docker on a aarch64 computer (like RPI)
Expected behavior
It would be nice if it didn't error :)
System information:
Additional context
The directory /sys/fs/cgroup/memory/ doesn't seem to exist on this architecture in general. Also, it It wouldn't be my intuition to depend on OS filesystem calls to do run the app but I mostly do web so maybe i know too little about it.
Also, there's something jinxed with respect to error handling, the stack trace disappears there I had to step in every await call before finding where the problem is.
The text was updated successfully, but these errors were encountered: