Skip to content

docs: add troubleshooting section to SETUP.md#1070

Open
Arvuno wants to merge 1 commit into
getmaxun:developfrom
Arvuno:contrib/maxun/setup-troubleshooting
Open

docs: add troubleshooting section to SETUP.md#1070
Arvuno wants to merge 1 commit into
getmaxun:developfrom
Arvuno:contrib/maxun/setup-troubleshooting

Conversation

@Arvuno

@Arvuno Arvuno commented May 21, 2026

Copy link
Copy Markdown

Summary

  • Add a 75-line Troubleshooting section to SETUP.md covering the 8 most common self-hosting problems
  • Sections: Database, MinIO/Storage, Redis, Playwright/Browser, JWT/Auth, CORS, Docker restart loops, Performance

Problem

SETUP.md had no troubleshooting section despite requiring 15+ complex environment variables and 4 external services (PostgreSQL, MinIO, Redis, Playwright). New self-hosters regularly hit the same errors (ECONNREFUSED, MinIO unreachable, JWT malformed, CORS).

Solution

Add a dedicated Troubleshooting section with symptom/cause/solution format:

  1. Database Connection Fails (ECONNREFUSED)
  2. MinIO / Storage Errors (endpoint unreachable, access key mismatch)
  3. Redis Connection Errors
  4. Playwright / Browser Errors (Chromium not found, sandbox)
  5. JWT / Authentication Failures
  6. CORS Errors in Browser Console
  7. Docker: Container Keeps Restarting
  8. Performance Issues

Risk / Compatibility

  • Risk: LOW — docs-only change to SETUP.md
  • Affects: documentation only
  • No code, no dependencies, no configuration changes

Notes for maintainers

  • This is purely a documentation addition to reduce support burden
  • Content is based on common patterns in self-hosting issues
  • Does not introduce any new technical recommendations

Summary by CodeRabbit

  • Documentation
    • Added comprehensive troubleshooting guide covering common setup and runtime issues, including PostgreSQL connections, storage configuration, Redis connectivity, browser setup, authentication failures, CORS errors, Docker container restarts, and performance optimization with verification steps and environment variable guidance.

Review Change Stack

@coderabbitai

coderabbitai Bot commented May 21, 2026

Copy link
Copy Markdown

Walkthrough

This PR adds a comprehensive Troubleshooting section to SETUP.md that documents common startup and runtime failures across database connectivity, object storage, caching, browser automation, authentication, CORS, container orchestration, and performance. Each subsection includes symptoms, root causes, and concrete verification or remediation steps with relevant environment-variable guidance.

Changes

Setup Troubleshooting Documentation

Layer / File(s) Summary
Troubleshooting guide with diagnostic steps
SETUP.md
New Troubleshooting section with categorized subsections for PostgreSQL, MinIO, Redis, Playwright, JWT authentication, CORS, Docker container restarts, and performance issues, each providing symptoms, likely causes, verification commands, and environment-variable guidance.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 A rabbit hops through setup woes,
With troubleshooting wisdom flows,
From database to cache so bright,
Each error fixed with steps just right!
✨ 🔧

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding a troubleshooting section to SETUP.md documentation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@SETUP.md`:
- Around line 108-109: Add entries for REDIS_HOST and REDIS_PASSWORD to the main
"Environment Variables" table so Redis connection params are documented and
their required/optional status is clear; reference the existing table and
include REDIS_HOST with examples/values for Docker Compose ("redis") vs local
("localhost") and REDIS_PASSWORD with guidance that empty means no password and
to avoid invisible characters, marking whether each is required (or optional)
and describing acceptable formats. Ensure the new descriptions mention the same
semantics used in the lines that currently note "Wrong `REDIS_HOST`" and "No
password" so the table and the inline notes stay consistent.
- Line 150: Add a new entry for the MAX_CONCURRENT_BROWSERS environment variable
in the Environment Variables table: declare the variable name
MAX_CONCURRENT_BROWSERS, set its purpose as "Limits the number of concurrent
Playwright browser instances for low-memory systems (performance tuning)",
provide a sensible default (e.g., 1), and mark "Mandatory" as "No"; update any
related examples or notes in SETUP.md where MAX_CONCURRENT_BROWSERS is
referenced so the table and the mention at line 150 are consistent.
- Line 99: Add MINIO_SECRET_KEY to the Environment Variables table next to
MINIO_ACCESS_KEY: add a table row for MINIO_SECRET_KEY (name: MINIO_SECRET_KEY),
mark it as required/mandatory, and give a short description like "MinIO secret
key used with MINIO_ACCESS_KEY for S3-compatible authentication — must match the
value used to initialize MinIO"; ensure formatting matches the existing table
rows and mention it pairs with MINIO_ACCESS_KEY for authentication.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 03c81d55-14f6-4fd6-923e-43d931757937

📥 Commits

Reviewing files that changed from the base of the PR and between 3263dca and 93a8526.

📒 Files selected for processing (1)
  • SETUP.md

Comment thread SETUP.md
**Causes & Solutions**:
- MinIO not running: `sudo systemctl start minio` (Linux) or start MinIO app (macOS/Windows)
- Wrong `MINIO_ENDPOINT`: If running locally without Docker, use `localhost`. With Docker, use the service name `minio`
- Wrong credentials: `MINIO_ACCESS_KEY` and `MINIO_SECRET_KEY` must match what MinIO was initialized with

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

Document MINIO_SECRET_KEY in the Environment Variables table.

Line 99 references MINIO_SECRET_KEY, but this variable is not documented in the Environment Variables table (lines 51-76). Only MINIO_ACCESS_KEY is listed. Since MinIO requires both an access key and secret key for authentication, MINIO_SECRET_KEY should be added to the main environment variables table with appropriate description and mandatory status.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@SETUP.md` at line 99, Add MINIO_SECRET_KEY to the Environment Variables table
next to MINIO_ACCESS_KEY: add a table row for MINIO_SECRET_KEY (name:
MINIO_SECRET_KEY), mark it as required/mandatory, and give a short description
like "MinIO secret key used with MINIO_ACCESS_KEY for S3-compatible
authentication — must match the value used to initialize MinIO"; ensure
formatting matches the existing table rows and mention it pairs with
MINIO_ACCESS_KEY for authentication.

Comment thread SETUP.md
Comment on lines +108 to +109
- Wrong `REDIS_HOST`: In Docker Compose, use `redis`. Locally, use `localhost`
- No password: If `REDIS_PASSWORD` is empty, ensure it is not set to a space or invisible character

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

Document Redis environment variables in the Environment Variables table.

Lines 108-109 reference REDIS_HOST and REDIS_PASSWORD, but these variables are not documented in the Environment Variables table (lines 51-76). If Redis is a required dependency (as stated in line 17), its connection parameters should be fully documented in the main environment variables section with appropriate descriptions and mandatory status.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@SETUP.md` around lines 108 - 109, Add entries for REDIS_HOST and
REDIS_PASSWORD to the main "Environment Variables" table so Redis connection
params are documented and their required/optional status is clear; reference the
existing table and include REDIS_HOST with examples/values for Docker Compose
("redis") vs local ("localhost") and REDIS_PASSWORD with guidance that empty
means no password and to avoid invisible characters, marking whether each is
required (or optional) and describing acceptable formats. Ensure the new
descriptions mention the same semantics used in the lines that currently note
"Wrong `REDIS_HOST`" and "No password" so the table and the inline notes stay
consistent.

Comment thread SETUP.md
### Performance Issues

- Increase `shm_size` in docker-compose for Playwright (recommended: `2gb`)
- Limit Playwright browsers: Set `MAX_CONCURRENT_BROWSERS=1` if running on low-memory systems

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Document MAX_CONCURRENT_BROWSERS in the Environment Variables table.

Line 150 references MAX_CONCURRENT_BROWSERS as a performance tuning option, but this variable is not documented in the Environment Variables table (lines 51-76). If this is a supported configuration option, it should be added to the environment variables section with appropriate description and mandatory status (likely "No" since it's for performance tuning).

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@SETUP.md` at line 150, Add a new entry for the MAX_CONCURRENT_BROWSERS
environment variable in the Environment Variables table: declare the variable
name MAX_CONCURRENT_BROWSERS, set its purpose as "Limits the number of
concurrent Playwright browser instances for low-memory systems (performance
tuning)", provide a sensible default (e.g., 1), and mark "Mandatory" as "No";
update any related examples or notes in SETUP.md where MAX_CONCURRENT_BROWSERS
is referenced so the table and the mention at line 150 are consistent.

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.

1 participant