Skip to content

Commit 20477fd

Browse files
committed
add cgroup memory to troubleshooting
1 parent 347676a commit 20477fd

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed

docs/install/index.md

+56
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,62 @@ To log in to an existing Coder deployment:
6868
coder login https://coder.example.com
6969
```
7070

71+
## Troubleshooting
72+
73+
### Unable to query ContainerMemory
74+
75+
When you query `ContainerMemory` and encounter the error:
76+
77+
```shell
78+
open /sys/fs/cgroup/memory.max: no such file or directory
79+
```
80+
81+
This error mostly affects Raspbery Pi OS, but might also affect older Debian-based systems as well.
82+
83+
<details><summary>Add `cgroup_memory=1 cgroup_enable=memory` to `cmdline.txt`:</summary>
84+
85+
1. Confirm the list of existing cgroup controllers doesn't include `memory`:
86+
87+
```console
88+
$ cat /sys/fs/cgroup/cgroup.controllers
89+
cpuset cpu io pids
90+
91+
$ cat /sys/fs/cgroup/cgroup.subtree_control
92+
cpuset cpu io pids
93+
```
94+
95+
1. Add cgroup entries to `cmdline.txt` in `/boot/firmware` (or `/boot/` on older Pi OS releases):
96+
97+
```text
98+
cgroup_memory=1 cgroup_enable=memory
99+
```
100+
101+
You can use `sed` to add it to the file for you:
102+
103+
```bash
104+
sudo sed -i '$s/$/ cgroup_memory=1 cgroup_enable=memory/' /boot/firmware/cmdline.txt
105+
```
106+
107+
1. Reboot:
108+
109+
```bash
110+
sudo reboot
111+
```
112+
113+
1. Confirm that the list of cgroup controllers now includes `memory`:
114+
115+
```console
116+
$ cat /sys/fs/cgroup/cgroup.controllers
117+
cpuset cpu io memory pids
118+
119+
$ cat /sys/fs/cgroup/cgroup.subtree_control
120+
cpuset cpu io memory pids
121+
```
122+
123+
Read more about cgroup controllers in [The Linux Kernel](https://docs.kernel.org/admin-guide/cgroup-v2.html#controlling-controllers) documentation.
124+
125+
</details>
126+
71127
## Next steps
72128

73129
- [Quickstart](../tutorials/quickstart.md)

0 commit comments

Comments
 (0)