-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
docs(self-hosted): cleanup troubleshooting section #12204
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
BYK
merged 5 commits into
getsentry:master
from
aldy505:docs/self-hosted/cleanup-troubleshooting-section
Jan 11, 2025
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
2949697
docs(self-hosted): initial attempt for cleaning up troubleshooting se…
aldy505 68a9fd5
docs(self-hosted): better title wording for troubleshooting
aldy505 bdb58e7
docs(self-hosted): component specific pagegrid
aldy505 b01f3b3
Merge remote-tracking branch 'origin/master' into docs/self-hosted/cl…
aldy505 0770d7e
Update docker.mdx
aldy505 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,83 @@ | ||
| --- | ||
| title: Troubleshooting Docker | ||
| sidebar_title: Docker | ||
| sidebar_order: 3 | ||
| --- | ||
|
|
||
| ## Container Healthcheck | ||
|
|
||
| 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 | ||
| ``` | ||
| 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. | ||
|
|
||
| ## Docker Network Conflicting IP Address | ||
|
|
||
| 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: | ||
|
|
||
| ```json | ||
| { | ||
| "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](https://en.wikipedia.org/wiki/Reserved_IP_addresses), that is between these ranges: | ||
| - `10.0.0.0/8` (address range of `10.0.0.0`–`10.255.255.255`) | ||
| - `100.64.0.0/10` (address range of `100.64.0.0`–`100.127.255.255`) | ||
| - `172.16.0.0/12` (address range of `172.16.0.0`–`172.31.255.255`) | ||
| - `192.0.0.0/24` (address range of `192.0.0.0`–`192.0.0.255`) | ||
| - `192.168.0.0/16` (address range of `192.168.0.0`–`192.168.255.255`) | ||
| - `198.18.0.0/15` (address range of `198.18.0.0`–`198.19.255.255`) | ||
|
|
||
| For further reading, you can see Matthew Stratiotto's article on [The definitive guide to docker's default-address-pools option](https://straz.to/2021-09-08-docker-address-pools/). | ||
|
|
||
| ## Logs Disk Usage | ||
|
|
||
| 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. | ||
|
|
||
| ```json | ||
| { | ||
| "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: | ||
|
|
||
| ```shell | ||
| truncate -s 0 /var/lib/docker/containers/**/*-json.log | ||
| ``` | ||
|
|
||
| ## Image and Builder Cleanup | ||
|
|
||
| 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. | ||
|
|
||
| ```shell | ||
| 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. | ||
BYK marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| docker volume prune | ||
| docker network prune | ||
| ``` | ||
|
|
||
| Append `-f` flag for no confirmation on deletions. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wouldn't really advertise this :) |
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| --- | ||
| title: Self-Hosted Troubleshooting | ||
| sidebar_title: Troubleshooting | ||
| sidebar_order: 9000 | ||
| --- | ||
|
|
||
| Please keep in mind that the [self-hosted repository](https://github.com/getsentry/self-hosted) is geared towards low traffic loads (less than ~1 million submitted Sentry events per month). Folks needing larger setups or having event spikes can expand from here based on their specific needs and environments. If this is not your cup of tea, you are always welcome to [try out hosted Sentry](https://sentry.io/signup/). | ||
BYK marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| ## General | ||
|
|
||
| You can see the logs of each service by running `docker compose logs <service_name>`. You can use the `-f` flag to "follow" the logs as they come in, and use the `-t` flag for timestamps. If you don't pass any service names, you will get the logs for all running services. See the [reference for the logs command](https://docs.docker.com/compose/reference/logs/) for more info. | ||
|
|
||
| ## Component Specific | ||
|
|
||
| Visit the following pages for troubleshooting guides for each component: | ||
|
|
||
| <PageGrid /> | ||
|
|
||
| ## Other | ||
|
|
||
| If you are still stuck, you can always visit our [GitHub issues](https://github.com/getsentry/self-hosted/issues) to search for existing issues or create a new issue and ask for help. You can also visit [Sentry Community Discord server](https://discord.gg/sentry) on #self-hosted channel. Please keep in mind that we expect the community to help itself, but Sentry employees also try to monitor and answer questions when they have time. | ||
BYK marked this conversation as resolved.
Show resolved
Hide resolved
|
||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You may want to be more specific about how to add these.