Troubleshooting Docker

There may be some circumstances which you may want to increase or decrease healthcheck interval, timeout or retries for your custom needs. This can be achieved by editing HEALTHCHECK_INTERVAL, HEALTHCHECK_TIMEOUT, HEALTHCHECK_RETRIES variables' values in .env.

Occasionally, you might see an error like this

Copied
container for service "${servicename}" is unhealthy

This can usually be resolved by running docker compose down and docker compose up --wait or rerunning the install script.

Self-hosted Sentry is using Docker's bridge networking, in which use a specific private IP range. By default, Docker uses 172.17.0.0/16 range (172.17.0.0-172.17.255.255). This may cause conflict with your private network. You can change Docker's default IP range by configuring the /etc/docker/daemon.json file. If the file does not exists, you can create it yourself.

Assuming your safe IP range is 10.147.0.0/16 and 10.146.0.0/16, your configuration would be:

Copied
{
  "default-address-pools": [
    {
      "base": "10.147.0.0/16",
      "size": 24
    },
    {
      "base": "10.146.0.0/16",
      "size": 24
    }
  ]
}

To apply new Docker daemon configuration, restart your Docker service with systemctl restart docker.

Make sure you are using valid private IP ranges, that is between these ranges:

  • 10.0.0.0/8 (address range of 10.0.0.010.255.255.255)
  • 100.64.0.0/10 (address range of 100.64.0.0100.127.255.255)
  • 172.16.0.0/12 (address range of 172.16.0.0172.31.255.255)
  • 192.0.0.0/24 (address range of 192.0.0.0192.0.0.255)
  • 192.168.0.0/16 (address range of 192.168.0.0192.168.255.255)
  • 198.18.0.0/15 (address range of 198.18.0.0198.19.255.255)

For further reading, you can see Matthew Stratiotto's article on The definitive guide to docker's default-address-pools option.

If you are suspecting persisted logs from Docker container logs consumes a lot of your disk space, you can configure the amount of persisted logs on Docker by configuring the /etc/docker/daemon.json file. If the file does not exists, you can create it yourself.

Copied
{
  "log-driver": "local",
  "log-opts": { "max-size": "10m", "max-file": "3" }
}

To apply new Docker daemon configuration, restart your Docker service with systemctl restart docker.

If you want to delete immediate Docker logs, you can execute this as root user:

Copied
truncate -s 0 /var/lib/docker/containers/**/*-json.log

Executing ./install.sh will build a new Sentry Docker container, executing it often might cause Docker to consume your disk space. You can safely prune old or unneeded Docker containers, image, or builder to re-acquire used disk space. Executing these will not affect current running containers and volumes.

Copied
docker container prune
docker builder prune
docker image prune --all
# WARNING: Executing "volume prune" might delete `sentry-vroom` volume as it's not an external volume.
docker volume prune
docker network prune

Append -f flag for no confirmation on deletions.

Help improve this content
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").