Runbooks
This document collects common operational procedures.
Check Service Readiness
Use when:
- the stack was just deployed
- users report the app is unavailable
- you changed infrastructure dependencies
Steps:
- check
GET /api/health - check
GET /api/health/ready - inspect
GET /api/health/status - verify PostgreSQL, MinIO, API, and worker processes are running
Healthy baseline:
- health reports
ok - readiness checks for database, object storage, and queue all pass
Investigate Stuck Document Processing
Use when:
- documents remain in
pendingorprocessing - review volume is not moving
- embeddings never appear
Check:
GET /api/health/status- queue depths
- recent processing jobs
- worker logs
- document
lastProcessingErrorin the UI or API
Likely causes:
- worker not running
- queue schema not ready
- object storage unavailable
- provider timeout or credential failure
- OCR dependency problems in non-container environments
Reprocess a Single Document
Use when:
- OCR output is wrong
- metadata extraction is poor
- provider configuration changed
Procedure:
- open the document in the UI and use
Reprocess Document - or call
POST /api/documents/:id/reprocess - monitor queue and recent jobs through
GET /api/health/status
Operational note:
- manual overrides remain locked unless cleared deliberately
Reprocess Many Documents
Use when:
- you changed parse provider behavior
- you want to refresh a segment of the archive
Procedure:
- select documents in explorer list view and use
Reprocess selected - or use
POST /api/documents/reprocess/bulk - monitor queue depth and recent jobs
Rebuild Embeddings
Use when:
- embedding provider settings changed
- semantic search quality is inconsistent after a configuration change
Procedure:
- confirm embedding provider configuration is valid
- trigger
POST /api/embeddings/reindexfor the desired scope - monitor queue depth and recent embedding jobs
Run a Watch-Folder Scan
Use when:
- external files were deposited into the watch folder
- you want to test the watch-folder path with a dry run
Procedure:
- confirm
WATCH_FOLDER_PATHis configured - trigger
POST /api/archive/watch-folder/scan - start with
dryRun: truewhen validating a new setup - inspect imported, duplicate, unsupported, and failed counts in the response or settings UI
Investigate Watch-Folder Failures
Common causes:
WATCH_FOLDER_PATHnot configured- unsupported MIME type
- duplicate checksum
- upload failure while importing the file
Look for:
- item-level reasons in the watch-folder scan result
- audit event
archive.watch_folder_scanned
Investigate Search Problems
Use when:
- semantic search returns weak or empty results
- archive-wide AI answers are poor or unavailable
Check:
- embedding provider configuration
- document chunk counts
- embedding status on recently ingested documents
- LLM provider configuration for answer generation
- whether the archive actually contains enough evidence
Investigate Provider Misconfiguration
Use when:
- settings page shows providers as unavailable
- cloud parse requests fail immediately
- AI answers or summaries disappear
Procedure:
- verify environment variables for the provider
- check
GET /api/health/providers - confirm the active provider id matches the configured credentials
- review API and worker logs for auth or timeout failures
Respond to Final Processing Failures
The worker emits structured log events such as:
document.processing_retry_scheduleddocument.processing_failed_finaldocument.embedding_enqueue_failed
When a final failure occurs:
- inspect the document record and latest job error
- identify whether the problem is file-specific, provider-specific, or infrastructure-specific
- fix the root cause
- reprocess the document if appropriate