This guide explains how to test Open WebUI with Redis and RQ (Redis Queue) for file processing locally.
When Redis is configured but the RQ worker isn't running, file processing jobs get enqueued but never processed, causing embeddings to fail.
The application now automatically starts an RQ worker when ENABLE_JOB_QUEUE=True and Redis is available.
For M1 Mac users:
# Build the image (native ARM64, faster)
docker build -t test_a3 .
# Start Redis and the application
docker-compose -f docker-compose.local.m1.yaml upFor Intel/AMD or cross-platform:
# Build the image
docker build -t test_a3 .
# Start Redis and the application
docker-compose -f docker-compose.local.yaml upOr simply (auto-detects):
docker build -t test_a3 .
docker-compose -f docker-compose.local.yaml upThis will:
- Start Redis on port 6379
- Start Open WebUI on port 8080
- Automatically start the RQ worker when
ENABLE_JOB_QUEUE=True
-
Access the application:
- Open WebUI: http://localhost:8080
- Redis: localhost:6379
-
Stop everything:
docker-compose -f docker-compose.local.yaml down
If you have Redis running locally (e.g., via brew install redis):
-
Start Redis locally:
redis-server
-
Build and run the container:
docker build -t test_a3 . docker run -it -p 8080:8080 \ -e REDIS_URL=redis://host.docker.internal:6379/0 \ -e ENABLE_JOB_QUEUE=True \ test_a3Note:
host.docker.internalallows the container to access Redis on your host machine.
If you don't want to use Redis/RQ:
docker build -t test_a3 .
docker run -it -p 8080:8080 \
-e ENABLE_JOB_QUEUE=False \
test_a3This will use FastAPI BackgroundTasks (in-memory, single process).
| Variable | Default | Description |
|---|---|---|
REDIS_URL |
redis://localhost:6379/0 |
Redis connection URL |
ENABLE_JOB_QUEUE |
True |
Enable/disable RQ job queue |
JOB_TIMEOUT |
3600 |
Job timeout in seconds (1 hour) |
JOB_MAX_RETRIES |
3 |
Maximum retries for failed jobs |
JOB_RETRY_DELAY |
60 |
Retry delay in seconds |
VECTOR_DB |
chroma |
Vector database: chroma (SQLite) or pgvector (PostgreSQL) |
DATABASE_URL |
sqlite:///{DATA_DIR}/webui.db |
Database URL (SQLite for local, PostgreSQL for production) |
Important:
- Local (SQLite): Use
VECTOR_DB=chroma(default) - Production (PostgreSQL): Use
VECTOR_DB=pgvectorwithDATABASE_URL=postgresql://...
See VECTOR_DB_CONFIG.md for details.
-
File Upload: When a file is uploaded, the application checks if the job queue is available.
-
Job Enqueueing: If
ENABLE_JOB_QUEUE=Trueand Redis is available:- Job is enqueued to Redis via RQ
- RQ worker processes the job asynchronously
- File is processed and embeddings are generated
-
Fallback: If the job queue is unavailable:
- Falls back to FastAPI BackgroundTasks
- Processing happens in the same process (synchronous)
-
Worker Startup: When
ENABLE_JOB_QUEUE=True,start.shautomatically starts an RQ worker in the background.
-
Check if worker is running:
# Inside the container ps aux | grep start_worker
-
Check Redis connection:
# Test Redis from container redis-cli -h redis ping # Or if using host Redis redis-cli -h host.docker.internal ping
-
Check job queue status:
- Look for logs:
"Enqueued file processing job"or"RQ Worker starting" - Check for errors:
"Failed to connect to Redis"or"Worker cannot start"
- Look for logs:
- Docker Compose: Redis service name is
redis, useredis://redis:6379/0 - Local Redis: Use
redis://host.docker.internal:6379/0from container - Network: Ensure Redis port 6379 is accessible
- Check
ENABLE_JOB_QUEUEis set toTrue - Check
REDIS_URLis correct and Redis is accessible - Check logs for worker startup errors
- Upload a file (PDF, DOCX, etc.) through the UI
- Check logs for:
"Enqueued file processing job: job_id=...""[JOB START] Processing file job: file_id=...""[JOB SUCCESS] Successfully processed file"
- Verify embeddings by querying the file in a chat
See REPLICAS_AND_SCALING.md for detailed information.
Quick Summary:
- Single replica: Works perfectly ✅ (1 app + 1 worker in same container)
- Multiple replicas: Works perfectly ✅ (N app pods + M worker pods, all share Redis queue)
- Auto-scaling: Configure HPA in Kubernetes/OpenShift
- Docker Compose: Single replica only (for local testing)
Key Points:
- All app replicas enqueue to the same Redis queue
- All worker replicas pull from the same Redis queue
- RQ automatically distributes jobs across workers
- Scale app and worker deployments independently
In production (e.g., OpenShift/Kubernetes):
- Use separate worker pods (see
kubernetes/manifest/base/rq-worker-deployment.yaml) - Configure Redis as a separate service
- Set
ENABLE_JOB_QUEUE=TrueandREDIS_URLappropriately - Scale app and worker deployments independently based on load