Skip to content

Bug: some scheduled tasks are queued but not run #1837

@jonasban

Description

@jonasban

Hey!

I don't know how to reproduce this yet, this happens randomly.

I have a simple DAG:

name: test-dag
schedule: "0/2 * * * *"
steps:
  - echo "Step 1 - Starting workflow"
  - echo "Step 2 - Processing data"
  - echo "Step 3 - Workflow complete"

Dagu is run using this compose file:

x-shared-parameters: &shared-parameters
  image: ghcr.io/dagu-org/dagu:2.3.4
  entrypoint: dagu
  environment:
    DAGU_HOME: /home/dagu/data
    DAGU_DAGS_DIR: /home/dagu/config/dags
    DAGU_BASE_CONFIG: /home/dagu/config/base.yaml"
    DAGU_DATA_DIR: /home/dagu/data
    DAGU_LOG_DIR: /home/dagu/logs
  volumes:
    - /var/run/docker.sock:/var/run/docker.sock
    - ./data:/home/dagu/data
    - ./config/config.yaml:/home/dagu/data/config.yaml
    - ./config:/home/dagu/config
    - ./logs:/home/dagu/logs


services:

  ui:
    <<: *shared-parameters
    ports:
      - 8080:8080
    command: ["server"]

  scheduler:
    <<: *shared-parameters
    deploy:
      mode: replicated
      replicas: 3
    command: ["scheduler"]

  coordinator:
    <<: *shared-parameters
    depends_on:
      - scheduler
    deploy:
      mode: replicated
      replicas: 3
    command: ["coordinator"]

  worker:
    <<: *shared-parameters
    depends_on:
      - coordinator
      - scheduler
    deploy:
      mode: replicated
      replicas: 2
    command: ["worker"]

Sometimes the task gets stuck at Queued state and stays there:

Image

This goes away only if I delete the run in question from /home/dagu/data/dag-runs/test-dag/dag-runs/2026/03/23/dag-run_20260323_091200Z_019d19f7-2302-7686-8499-fc839bee9648

Logs do not appear for this run so I cannot attach those. It would be nice the scheduler could get this "unstuck" somehow by running it again after some time. In the meantime, how do I force-start such stuck tasks?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions