Skip to content

Commit 89ea3df

Browse files
committed
Add warning about open file limits to readme
1 parent fb2b828 commit 89ea3df

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ Setting up your environment is done in three easy steps:
1212
2. Then, configure how requests are dispatched in `config/dispatcher.ex`
1313
3. Lastly, simply start the docker-compose.
1414

15+
> [!WARNING]
16+
> Many of the containers used have issues with high limits on open file descriptors, so you might need [to work around this](#containers-stuck-while-starting-using-100-cpu)
17+
1518
#### Hooking things up with docker-compose
1619

1720
Alter the `docker-compose.yml` file so it contains all microservices you need. The example content should be clear, but you can find more information in the [Docker Compose documentation](https://docs.docker.com/compose/). Don't remove the `identifier` and `db` container, they are respectively the entry-point and the database of your application. Don't forget to link the necessary microservices to the dispatcher and the database to the microservices.
@@ -32,3 +35,29 @@ You can shut down using `docker-compose stop` and remove everything using `docke
3235
## Tutorials
3336

3437
To help you find your feet with your first semantic works projects, we've collected [a few tutorials](TUTORIALS.md).
38+
39+
## Troubleshooting
40+
41+
### Containers stuck while starting, using 100% CPU
42+
Some docker images used in mu-project, notably those based on sbcl (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)):
43+
44+
```json
45+
{
46+
"default-ulimits": {
47+
"nofile": {
48+
"Hard": 104583,
49+
"Name": "nofile",
50+
"Soft": 104583
51+
}
52+
}
53+
}
54+
```
55+
56+
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:
57+
58+
```yml
59+
ulimits:
60+
nofile:
61+
soft: 104583
62+
hard: 104583
63+
```

0 commit comments

Comments
 (0)