Checking System Health First
Before diving into specific issues, run a quick health check:xr-ui, xr-watcher, xr-api, ollama.
Containers
A container keeps restarting
- Port conflict: Another process is using port 8501 or 8510. Find it with
sudo ss -tlnp | grep 8501and stop it. - Volume mount error: The
app/,data/, orstorage/directories don’t exist or have wrong permissions. Check withls -la /opt/xr/. - Out of memory: The server is running out of RAM. Check with
free -h. Consider closing other applications or upgrading RAM.
The UI shows “Please wait…” indefinitely
The Streamlit UI container is starting up. This is normal for the first 15–30 seconds afterdocker compose up. If it persists beyond 2 minutes:
Containers start but the site is unreachable
Check Nginx:AI Processing
Documents stay in “Processing” status indefinitely
The AI worker is stuck or the model isn’t loaded. Check:- Model not pulled: Run
docker exec ollama ollama pull qwen3.5:9b - Ollama out of VRAM: Check GPU memory with
nvidia-smi— if VRAM is full, another process may be using the GPU - Watcher crashed: Restart with
docker restart xr-watcher
First document takes more than 10 minutes
This is normal on a cold start. The AI model (6.6 GB) needs to load into GPU VRAM the first time it’s called. Subsequent documents process much faster. Run a warmup document after any server restart:AI extracts wrong fields
This is usually a profile mismatch — the extraction profile doesn’t match the document type. Check:- Is the correct profile selected for this document type? (Standard Invoice for invoices, Chinese Fapiao for fapiao, etc.)
- Are the field labels in your custom profile clear and descriptive?
- Is the document quality sufficient — clear text, good scan resolution?
Confidence scores are consistently low
Low confidence across many documents usually indicates:- Wrong extraction profile for the document type — create a custom profile that matches your specific format
- Poor document image quality — rescan at 300 DPI minimum
- Unusual document layout — add field descriptions in your profile to guide the AI
UI Issues
Chat returns empty responses
The AI model is likely running withthink: True, which consumes all output tokens on reasoning. This is a configuration issue. Check docker-compose.yml for the model configuration and confirm think: False is set.
Alternatively, the model may have returned an empty response due to a timeout. Check:
PDF preview is broken / shows blank
Thepdf2image library or its dependency poppler-utils is not installed:
poppler-utils may be missing from the container image — rebuild the image:
“Database is locked” errors
SQLite is being written to by multiple processes simultaneously. This is usually transient — wait a few seconds and retry. If it persists:Authentication
Locked out of the admin account
If you’ve forgotten the admin password and can’t log in, reset it directly in the database:YOUR_NEW_PASSWORD with your new password and PASTE_HASH_HERE with the hash output from the first command.