Skip to content

docs: add cgroup memory troubleshooting to install doc #16920

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

Merged
merged 7 commits into from
Mar 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions docs/admin/templates/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,3 +170,59 @@ See our
to optimize your templates based on this data.

![Workspace build timings UI](../../images/admin/templates/troubleshooting/workspace-build-timings-ui.png)

## 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 removed docs/images/install/coder-setup.png
Binary file not shown.
Binary file modified docs/images/screenshots/welcome-create-admin-user.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/install/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ To start the Coder server:
coder server
```

![Coder install](../images/install/coder-setup.png)
![Coder install](../images/screenshots/welcome-create-admin-user.png)

To log in to an existing Coder deployment:

Expand Down
2 changes: 1 addition & 1 deletion docs/install/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ To start the Coder server:
coder server
```

![Coder install](../images/install/coder-setup.png)
![Coder install](../images/screenshots/welcome-create-admin-user.png)

To log in to an existing Coder deployment:

Expand Down
Loading