Skip to content
Snippets Groups Projects
Commit 73718929 authored by Ian Baum's avatar Ian Baum
Browse files

Merge branch 'docs-set-shm-size-docker' into 'master'

Update docs to specify recommended size for /dev/shm directory in Docker containers

Closes #5476

See merge request gitlab-org/omnibus-gitlab!4532
parents 47ce4191 50b0d88a
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -600,3 +600,30 @@ sudo setfacl -mR default:group:docker:rwx $GITLAB_HOME
 
The default group is `docker`. If you changed the group, be sure to update your
commands.
### /dev/shm mount not having enough space in Docker container
GitLab comes with a Prometheus metrics endpoint at `/-/metrics` to expose a
variety of statistics on the health and performance of GitLab. The files
required for this gets written to a temporary file system (like `/run` or
`/dev/shm`).
By default, Docker allocates 64Mb to the shared memory directory (mounted at
`/dev/shm`). This is insufficient to hold all the Prometheus metrics related
files generated, and will generate error logs like the following:
```plaintext
writing value to /dev/shm/gitlab/sidekiq/gauge_all_sidekiq_0-1.db failed with unmapped file
writing value to /dev/shm/gitlab/sidekiq/gauge_all_sidekiq_0-1.db failed with unmapped file
writing value to /dev/shm/gitlab/sidekiq/gauge_all_sidekiq_0-1.db failed with unmapped file
writing value to /dev/shm/gitlab/sidekiq/histogram_sidekiq_0-0.db failed with unmapped file
writing value to /dev/shm/gitlab/sidekiq/histogram_sidekiq_0-0.db failed with unmapped file
writing value to /dev/shm/gitlab/sidekiq/histogram_sidekiq_0-0.db failed with unmapped file
writing value to /dev/shm/gitlab/sidekiq/histogram_sidekiq_0-0.db failed with unmapped file
```
Other than disabling the Prometheus Metrics from the Admin page, the recommended
solution to fix this problem is to increase the size of shm to at least 256Mb.
If using `docker run`, this can be done by passing the flag `--shm-size 256m`.
If using a `docker-compose.yml` file, the `shm_size` key can be used for this
purpose.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment