Skip to content

docs(self-hosted): Update troubleshooting Docker healthcheck (clarify unhealthy container troubleshooting on slower systems)#17149

Open
arsalanyavari wants to merge 5 commits intogetsentry:masterfrom
arsalanyavari:patch-1
Open

docs(self-hosted): Update troubleshooting Docker healthcheck (clarify unhealthy container troubleshooting on slower systems)#17149
arsalanyavari wants to merge 5 commits intogetsentry:masterfrom
arsalanyavari:patch-1

Conversation

@arsalanyavari
Copy link
Copy Markdown

DESCRIBE YOUR PR

This PR updates the self-hosted Docker troubleshooting docs with guidance for resolving container for service "${servicename}" is unhealthy on slower systems.

It adds a note explaining how to override HEALTHCHECK_* values from .env in .env.custom, with an example using HEALTHCHECK_RETRIES that could resolve the problem.

Closes getsentry/self-hosted#4231

IS YOUR CHANGE URGENT?

Help us prioritize incoming PRs by letting us know when the change needs to go live.

  • Urgent deadline (GA date, etc.):
  • Other deadline:
  • None: Not urgent, can wait up to 1 week+

SLA

  • Teamwork makes the dream work, so please add a reviewer to your PRs.
  • Please give the docs team up to 1 week to review your PR unless you've added an urgent due date to it.
    Thanks in advance for your help!

PRE-MERGE CHECKLIST

Make sure you've checked the following before merging your changes:

  • Checked Vercel preview for correctness, including links
  • PR was reviewed and approved by any necessary SMEs (subject matter experts)
  • PR was reviewed and approved by a member of the Sentry docs team

LEGAL BOILERPLATE

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

EXTRA RESOURCES

Copilot AI review requested due to automatic review settings March 27, 2026 12:20
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 27, 2026

@arsalanyavari is attempting to deploy a commit to the Sentry Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the self-hosted Docker troubleshooting documentation to help users resolve container for service "${servicename}" is unhealthy on slower systems by explaining how to tune Docker healthcheck settings via environment overrides.

Changes:

  • Updates the “Container Healthcheck” section to direct users toward overriding HEALTHCHECK_* values via .env.custom.
  • Adds a note for slower/minimum-spec systems, including an example of increasing HEALTHCHECK_RETRIES.

Comment on lines +22 to +24
> [!NOTE]
> On slower systems, including systems that only meet the minimum resource requirements for self-hosted Sentry, this issue may still persist even after rerunning `docker compose down` and `docker compose up --wait`.
>
Copy link

Copilot AI Mar 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This uses GitHub-style callouts (> [!NOTE]), but elsewhere in these docs the convention is to use the MDX <Alert ...> component for notes/tips/warnings. Using a different admonition format here may not render as intended on the docs site; consider converting this block to <Alert level="info" title="Note">…</Alert> (or the appropriate level/title) to match existing self-hosted docs (e.g. develop-docs/self-hosted/troubleshooting/kafka.mdx).

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I fix it based on another file in doc

Comment on lines +34 to +35
> Then start Docker Compose.
>
Copy link

Copilot AI Mar 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

“Then start Docker Compose.” is ambiguous, especially since .env.custom won’t take effect unless the user runs Compose with the right --env-file flags. Consider making this step explicit (for example, calling out docker compose --env-file .env --env-file .env.custom up --wait, or pointing readers to the configuration docs) so readers don’t edit .env.custom and then rerun the same command with no change.

Suggested change
> Then start Docker Compose.
>
> Then restart Docker Compose so it picks up the new settings:
>
> ```shell
> docker compose --env-file .env --env-file .env.custom up --wait
> ```
>

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this one is fixed also.

arsalanyavari and others added 2 commits March 27, 2026 15:55
…ra white space.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
arsalanyavari and others added 2 commits March 27, 2026 16:21
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
HEALTHCHECK_RETRIES=20
```

Then start Docker Compose.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The troubleshooting guide for Docker healthchecks is incomplete. It instructs creating .env.custom but omits the required --env-file flag in the docker compose command, rendering the fix ineffective.
Severity: MEDIUM

Suggested Fix

Replace the vague instruction "Then start Docker Compose." with the explicit command required to load the custom environment file, such as docker compose --env-file .env --env-file .env.custom up --wait. This ensures the HEALTHCHECK_RETRIES override is correctly applied.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: develop-docs/self-hosted/troubleshooting/docker.mdx#L34

Potential issue: The troubleshooting documentation for Docker healthchecks on slower
systems instructs users to create a `.env.custom` file with `HEALTHCHECK_RETRIES=20`.
However, it then vaguely states "Then start Docker Compose" without providing the
necessary command. Docker Compose does not automatically load `.env.custom`, so the
override will not be applied. This will cause the documented solution to fail, leaving
the user confused as the healthcheck issue persists despite following the steps. The
correct command, `docker compose --env-file .env --env-file .env.custom up --wait`, is
required to load the custom environment file.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@arsalanyavari does this review make sense?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sergical I think this sentence is enough. There’s no need to explain how to start Docker Compose again, since it’s already mentioned above and in the main documentation based on @aldy505 contribution to this repo.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you think it’s necessary to mention this again, we can repeat that line as well (or I can move the Docker Compose start command closer to this section instead).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i mean more so the part about creating a new .env.custom file. Can the healthcheck value not go into the existing .env file?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i mean more so the part about creating a new .env.custom file. Can the healthcheck value not go into the existing .env file?

@sergical we actually don't suggest users to update the .env file. If they want to add more changes, they should do so on .env.custom or docker-compose.override.yml, both are gitignored.

@aldy505 aldy505 requested a review from sergical March 27, 2026 22:55
@aldy505 aldy505 changed the title Update troubleshooting Docker healthcheck (clarify unhealthy container troubleshooting on slower systems) docs(self-hosted): Update troubleshooting Docker healthcheck (clarify unhealthy container troubleshooting on slower systems) Mar 30, 2026
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 30, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
develop-docs Ready Ready Preview, Comment Mar 30, 2026 10:15pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
sentry-docs Ignored Ignored Preview Mar 30, 2026 10:15pm

Request Review

Copy link
Copy Markdown
Contributor

@coolguyzone coolguyzone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, please resolve the sentrybot feedback that Serge commented on as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

HEALTHCHECK_START_PERIOD may be too short for slower systems

5 participants