Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conductor waits more than an hour to schedule the next task. #163

Open
adrichem opened this issue May 17, 2024 · 2 comments
Open

Conductor waits more than an hour to schedule the next task. #163

adrichem opened this issue May 17, 2024 · 2 comments

Comments

@adrichem
Copy link

Describe the bug
Tasks with an execution time of several minutes complete successfully, but the next task is not scheduled until approx. an hour and a half later. The worker is running and idle. The task queue has a size of 0 and shows the working polling every second.

Whenever I execute the workflow below, the tasks in fork all run fine, The first tasks in each parallel path of fork_2 complete but the no-op-worker-SET2-1-2 and no-op-worker-SET2-2-2 tasks don't execute. The execution tab in the UI shows them with status 'Not executed'

Details
Conductor version: Tried 3.18.0 and 3.19.0

Running based on Running Conductor Using Docker for evaluation and demo purposes.

On the Orkes playground, these type of workflows are running fine. I checked the documentation, but did not find anything that seemed relevant to configure.

Workflow definition:
Here's a workflow that demonstrates the issue.

{
  "updateTime": 1715972548277,
  "accessPolicy": {},
  "name": "why_so_long",
  "version": 1,
  "tasks": [
    {
      "name": "fork",
      "taskReferenceName": "fork",
      "inputParameters": {},
      "type": "FORK_JOIN",
      "forkTasks": [
        [
          {
            "name": "no-op-worker",
            "taskReferenceName": "no-op-worker-SET1-1-1",
            "inputParameters": {
              "Time": "00:00:01"
            },
            "type": "SIMPLE",
            "startDelay": 0,
            "optional": false,
            "asyncComplete": false,
            "permissive": false
          },
          {
            "name": "no-op-worker",
            "taskReferenceName": "no-op-worker-SET1-1-2",
            "inputParameters": {
              "Time": "00:00:01"
            },
            "type": "SIMPLE",
            "startDelay": 0,
            "optional": false,
            "asyncComplete": false,
            "permissive": false
          }
        ],
        [
          {
            "name": "no-op-worker",
            "taskReferenceName": "no-op-worker-SET1-2-1",
            "inputParameters": {
              "Time": "00:00:01"
            },
            "type": "SIMPLE",
            "startDelay": 0,
            "optional": false,
            "asyncComplete": false,
            "permissive": false
          },
          {
            "name": "no-op-worker",
            "taskReferenceName": "no-op-worker-SET1-2-2",
            "inputParameters": {
              "Time": "00:00:01"
            },
            "type": "SIMPLE",
            "startDelay": 0,
            "optional": false,
            "asyncComplete": false,
            "permissive": false
          }
        ]
      ],
      "startDelay": 0,
      "optional": false,
      "asyncComplete": false,
      "permissive": false
    },
    {
      "name": "join",
      "taskReferenceName": "join",
      "inputParameters": {},
      "type": "JOIN",
      "startDelay": 0,
      "joinOn": [
        "no-op-worker-SET1-1-1",
        "no-op-worker-SET1-1-2",
        "no-op-worker-SET1-2-1",
        "no-op-worker-SET1-2-2"
      ],
      "optional": false,
      "asyncComplete": false,
      "permissive": false
    },
    {
      "name": "fork_2",
      "taskReferenceName": "fork_2",
      "inputParameters": {},
      "type": "FORK_JOIN",
      "forkTasks": [
        [
          {
            "name": "no-op-worker",
            "taskReferenceName": "no-op-worker-SET2-1-1",
            "inputParameters": {
              "Time": "00:02:00"
            },
            "type": "SIMPLE",
            "startDelay": 0,
            "optional": false,
            "asyncComplete": false,
            "permissive": false
          },
          {
            "name": "no-op-worker",
            "taskReferenceName": "no-op-worker-SET2-1-2",
            "inputParameters": {
              "Time": "00:02:00"
            },
            "type": "SIMPLE",
            "startDelay": 0,
            "optional": false,
            "asyncComplete": false,
            "permissive": false
          }
        ],
        [
          {
            "name": "no-op-worker",
            "taskReferenceName": "no-op-worker-SET2-2-1",
            "inputParameters": {
              "Time": "00:02:00"
            },
            "type": "SIMPLE",
            "startDelay": 0,
            "optional": false,
            "asyncComplete": false,
            "permissive": false
          },
          {
            "name": "no-op-worker",
            "taskReferenceName": "no-op-worker-SET2-2-2",
            "inputParameters": {
              "Time": "00:02:00"
            },
            "type": "SIMPLE",
            "startDelay": 0,
            "optional": false,
            "asyncComplete": false,
            "permissive": false
          }
        ]
      ],
      "startDelay": 0,
      "optional": false,
      "asyncComplete": false,
      "permissive": false
    },
    {
      "name": "join_2",
      "taskReferenceName": "join_2",
      "inputParameters": {},
      "type": "JOIN",
      "startDelay": 0,
      "joinOn": [
        "no-op-worker-SET2-1-1",
        "no-op-worker-SET2-1-2",
        "no-op-worker-SET2-2-1",
        "no-op-worker-SET2-2-2"
      ],
      "optional": false,
      "asyncComplete": false,
      "permissive": false
    }
  ],
  "inputParameters": [],
  "outputParameters": {},
  "schemaVersion": 2,
  "restartable": true,
  "workflowStatusListenerEnabled": false,
  "ownerEmail": "test@example.com",
  "timeoutPolicy": "ALERT_ONLY",
  "timeoutSeconds": 0,
  "variables": {},
  "inputTemplate": {}
}

Task definition:

{
  "createTime": 1715972548160,
  "createdBy": "",
  "accessPolicy": {},
  "name": "no-op-worker",
  "description": "Does nothing",
  "retryCount": 3,
  "timeoutSeconds": 0,
  "inputKeys": [
    "Time"
  ],
  "outputKeys": [],
  "timeoutPolicy": "TIME_OUT_WF",
  "retryLogic": "FIXED",
  "retryDelaySeconds": 60,
  "responseTimeoutSeconds": 3600,
  "inputTemplate": {
    "Time": "00:00:05.00"
  },
  "rateLimitPerFrequency": 0,
  "rateLimitFrequencyInSeconds": 1,
  "ownerEmail": "test@test.com",
  "backoffScaleFactor": 1
}

To Reproduce
The no-op-worker sleeps for for requested Time and return completed state. Its instantiated like this: [WorkerTask(taskType: "no-op-worker", batchSize: 100, domain: null, pollIntervalMs: 200, workerId: "deploy-worker")]

Expected behavior
I expect the next task to be scheduled for execution when its predecessor completes.

@v1r3n
Copy link
Collaborator

v1r3n commented Jun 3, 2024

can you share how many running workflows do you have in the system?
Do you use redis or postgres as the setup?

@adrichem
Copy link
Author

adrichem commented Jun 3, 2024

Hi @v1r3n, Thanks for the response. There are no other running workflows. Its using redis with the config of the default docker-compose.yaml from the repo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants