directus-labs / directus-labs/directus-template-cli

Error: "Server under pressure"

Open
#77 11 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

question
Dominant language
TypeScript
Stars
191
Forks
37
PR merge metrics
No merged PRs in 30d

Description

After setting up Directus, I've attempted to run 'npx directus-template-cli@latest apply' in order to apply the AgencyOS template. However after selecting the template, entering my URL and access token I get the following output:

=== Applying template - AgencyOS to [url]

Loading 76 collections and 700 fields... done
Loading 176 relations... done
Loading 4 roles... done
Loading 5 policies... done
Loading 415 permissions... done
Loading 5 users... done
Loading 5 accesses... done
Loading 17 folders... done
-- Server under pressure. Retrying after 5000ms
-- Retrying job (attempt 1)
-- Server under pressure. Retrying after 5000ms
-- Retrying job (attempt 1)
-- Server under pressure. Retrying after 5000ms
-- Retrying job (attempt 1)
-- Server under pressure. Retrying after 5000ms
-- Retrying job (attempt 1)

Even after waiting a long time it just keeps on retrying without any success.

The error logs in "/.directus/.directus-template-cli/logs" unfortunately don't contain any information except "Log started at 2025-03-10T03-28-01-306Z".

I've checked my server utilization and everything looks fine (meaning neither my CPU nore memory usage are anywhere near full capacity). I'm using Ubuntu 22.04.5 LTS in case this might be relevant.

Content of my docker-compose.yaml file:

version: '3'
services:
  database:
    image: mysql:8.0
    # Required when running on platform other than amd64, like Apple M1/M2:
    # platform: linux/amd64
    ports:
      - 3307:3306
    volumes:
      - ./data/database:/var/lib/mysql
    environment:
      MYSQL_ROOT_PASSWORD: '[password]'
      MYSQL_USER: '[user]'
      MYSQL_PASSWORD: '[password]'
      MYSQL_DATABASE: '[db]'
    command: --default-authentication-plugin=mysql_native_password
    healthcheck:
      test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
      timeout: 5s
      retries: 10
  cache:
    image: redis:6
  directus:
    image: directus/directus:11.5.1
    ports:
      - 8055:8055
    volumes:
      - ./uploads:/directus/uploads
      - ./extensions:/directus/extensions
    depends_on:
      database:
        condition: service_healthy
    environment:
      KEY: '[key]'
      SECRET: '[secret]'
      DB_CLIENT: 'mysql'
      DB_HOST: 'database'
      DB_PORT: '3306'
      DB_DATABASE: '[db]'
      DB_USER: '[user]'
      DB_PASSWORD: '[password]'
      CACHE_ENABLED: 'false'
      CACHE_STORE: 'redis'
      REDIS: 'redis://cache:6379'
      ADMIN_EMAIL: '[email]'
      ADMIN_PASSWORD: '[password]'
      # These is helpful for local developement but should probably be removed in production
      # CORS_ENABLED: 'true'
      # REFRESH_TOKEN_COOKIE_DOMAIN: 'localhost'
      # EXTENSIONS_AUTO_RELOAD: 'true'
      WEBSOCKETS_ENABLED: 'true'
      # The default config prevents importing files from 0.0.0.0. See https://docs.directus.io/self-hosted/config-options.html#security . This can be removed in production but in local development it is recommended to keep it so you can import logos from Organization > website.
      IMPORT_IP_DENY_LIST: ''
      # Make sure to set this in production
      # (see https://docs.directus.io/self-hosted/config-options#general)
      PUBLIC_URL: '[url]'

Are there any methods to get more detailed error logs or common troubleshooting steps I should try? Any help would be greatly appreciated.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the npx directus-template-cli@latest apply entry point and reproduce the AgencyOS application using the issue's docker-compose.yaml. Inspect the .directus/.directus-template-cli/logs output alongside the repeated Server under pressure messages. Done means identifying why retries never succeed and providing actionable error logging or a documented fix for this setup.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, mysql, redis, typescript
Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.