Skip to main content

Troubleshooting FAQ

All frequent questions on troubleshooting issues.

  1. 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
  2. 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.

  3. 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 migrations
  • showmigrations checks the status of migrations
  • create_schema creates a schema in the DB
  • drop_schema drops a schema in the DB
  • dbshell runs the command line client for the DB
  • shell 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