Troubleshooting FAQ
All frequent questions on troubleshooting issues.
How to debug tool related errors in a workflow?
-
The
runner
is responsible for running tools as standalone containers when a workflow is run. It creates a container for each file being processed. By default these tool containers are removed once processing is complete.docker compose -f docker/docker-compose.yaml logs runner
-
Viewing the above tool containers logs will provide further details on the arguments passed to each tool and the processing involved. To achieve this, retain spawned tool containers by setting the REMOVE_CONTAINER_ON_EXIT env for
runner
. Restart the container for the env changes to reflect.REMOVE_CONTAINER_ON_EXIT=False
Re-run the workflow and check the tool containers logs.
-
Additionally, access an individual service's logs apart from
backend
based on the scenario run# Workflow
docker compose -f docker/docker-compose.yaml logs backend
# ETL / Task pipelines
docker compose -f docker/docker-compose.yaml logs worker
# API deployments
docker compose -f docker/docker-compose.yaml logs worker-api-deployment
# Prompt studio exported tools calling LLM
docker compose -f docker/docker-compose.yaml logs prompt-service
How to run Django's admin commands?
Django provides a powerful utitlity to run some commands to perform administrative tasks
docker compose exec -it backend bash
.venv/bin/python manage.py --help
Some useful commands include
migrate
perform migrationsshowmigrations
checks the status of migrationscreate_schema
creates a schema in the DBdrop_schema
drops a schema in the DBdbshell
runs the command line client for the DBshell
runs an interpreter
How to connect to Postgres DB through its container?
Make sure to use values configured in your backend/.env
docker compose exec -it db bash
psql -h localhost -p 5432 -U unstract_dev -d unstract_db
# List databases
\l
# Connect to a database to run queries
\c unstract_db