mirror of
https://github.com/coder/coder.git
synced 2025-07-12 00:14:10 +00:00
docs: add cgroup memory troubleshooting to install doc (#16920)
originally thought this fit under [Unofficial Install Methods](https://coder.com/docs/install/other), but we don't talk about Raspberry Pi anywhere, so ~the general Install doc might be a better fit~ moved to admin>templates>troubleshooting [preview](https://coder.com/docs/@3-cgroup-mem/admin/templates/troubleshooting#coder-on-raspberry-pi-os) --------- Co-authored-by: EdwardAngert <17991901+EdwardAngert@users.noreply.github.com> Co-authored-by: M Atif Ali <atif@coder.com>
This commit is contained in:
@ -170,3 +170,59 @@ See our
|
||||
to optimize your templates based on this data.
|
||||
|
||||

|
||||
|
||||
## Docker Workspaces on Raspberry Pi OS
|
||||
|
||||
### Unable to query ContainerMemory
|
||||
|
||||
When you query `ContainerMemory` and encounter the error:
|
||||
|
||||
```shell
|
||||
open /sys/fs/cgroup/memory.max: no such file or directory
|
||||
```
|
||||
|
||||
This error mostly affects Raspberry Pi OS, but might also affect older Debian-based systems as well.
|
||||
|
||||
<details><summary>Add cgroup_memory and cgroup_enable to cmdline.txt:</summary>
|
||||
|
||||
1. Confirm the list of existing cgroup controllers doesn't include `memory`:
|
||||
|
||||
```console
|
||||
$ cat /sys/fs/cgroup/cgroup.controllers
|
||||
cpuset cpu io pids
|
||||
|
||||
$ cat /sys/fs/cgroup/cgroup.subtree_control
|
||||
cpuset cpu io pids
|
||||
```
|
||||
|
||||
1. Add cgroup entries to `cmdline.txt` in `/boot/firmware` (or `/boot/` on older Pi OS releases):
|
||||
|
||||
```text
|
||||
cgroup_memory=1 cgroup_enable=memory
|
||||
```
|
||||
|
||||
You can use `sed` to add it to the file for you:
|
||||
|
||||
```bash
|
||||
sudo sed -i '$s/$/ cgroup_memory=1 cgroup_enable=memory/' /boot/firmware/cmdline.txt
|
||||
```
|
||||
|
||||
1. Reboot:
|
||||
|
||||
```bash
|
||||
sudo reboot
|
||||
```
|
||||
|
||||
1. Confirm that the list of cgroup controllers now includes `memory`:
|
||||
|
||||
```console
|
||||
$ cat /sys/fs/cgroup/cgroup.controllers
|
||||
cpuset cpu io memory pids
|
||||
|
||||
$ cat /sys/fs/cgroup/cgroup.subtree_control
|
||||
cpuset cpu io memory pids
|
||||
```
|
||||
|
||||
Read more about cgroup controllers in [The Linux Kernel](https://docs.kernel.org/admin-guide/cgroup-v2.html#controlling-controllers) documentation.
|
||||
|
||||
</details>
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 199 KiB |
Binary file not shown.
Before Width: | Height: | Size: 72 KiB After Width: | Height: | Size: 83 KiB |
@ -49,7 +49,7 @@ To start the Coder server:
|
||||
coder server
|
||||
```
|
||||
|
||||

|
||||

|
||||
|
||||
To log in to an existing Coder deployment:
|
||||
|
||||
|
@ -60,7 +60,7 @@ To start the Coder server:
|
||||
coder server
|
||||
```
|
||||
|
||||

|
||||

|
||||
|
||||
To log in to an existing Coder deployment:
|
||||
|
||||
|
Reference in New Issue
Block a user