Skip to content
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

Add How-to for troubleshooting slow starting containers #1

Merged
merged 1 commit into from
Sep 13, 2023
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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ If you want more information behind the design of semantic.works, you can read t
- [Supporting MacOS](docs/discussions/supporting-mac-os.md)

## How-to
- [Develop with your local IDE and tools inside a Docker container](docs/how-to/developing-inside-containers.md)

- [Develop with your local IDE and tools inside a Docker container](docs/how-tos/developing-inside-containers.md)
- [Troubleshooting - Slow starting containers using 100% CPU](docs/how-tos/troubleshooting---slow-starting-containers.md)

## Writeups
Our retrospectives on...
Expand Down
25 changes: 25 additions & 0 deletions docs/how-tos/troubleshooting---slow-starting-containers.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Troubleshooting - Slow starting containers using 100% CPU

Some docker images used in Semantic Works stacks, notably those based on sbcl (common lisp) and elixir images, are very slow and CPU intensive to start if the limits of open file descriptors are very high for the container. This leads to a process using 100% of a CPU for some time before that container becomes usable. This can be worked around by setting the defaults for new containers in the docker daemon config (/etc/docker/daemon.json (create it if it doesn't exist)):

```json
{
"default-ulimits": {
"nofile": {
"Hard": 104583,
"Name": "nofile",
"Soft": 104583
}
}
}
```

Or, if you want these high defaults for some reason, you can set per-container limits in a docker-compose file for each of the mu-project services:

```yml
ulimits:
nofile:
soft: 104583
hard: 104583
```