Workflow execution stuck in queue · Issue #1352 · danielgerlag/workflow-core · GitHub
Skip to content

Workflow execution stuck in queue #1352

Open

Description

@vpandev

Hey @danielgerlag.

We are currently encountering an issue where workflows are stuck in queue from time to time.

The workflow comes to QueueConsumer->Execute method, with EnableSecondPasses always set to false, stays in the loop for 10-15mins and it goes through without any exception logged.

We've added some logs and keeps coming in this block:

Image

We see that it's coming here for other workflows too but they're finishing really fast. We've tried everything but no clue why this is happening.

Our app is running on Azure App Service with B3 plan.

Many thanks,
Vase

Activity

  1. vpandev commented on Apr 28, 2025

    @vpandev
    Author

    @danielgerlag could you help me, thanks a lot.

  2. jlenk commented on Jul 1, 2026

    @jlenk

    The calling of QueueProvider.QueueWork() here causes this loop to continuously iterate as long as the _activeTask hasTask is true. This may not be causing much harm for fast processors but on high-speed processors this uses around 6 percent of the CPU doing nothing. On slower processors I'm seeing as much as 50 percent utilization from this. Please help me understand what the intent here is for this requeuing.

  3. jlenk commented on Jul 6, 2026

    @jlenk

    @danielgerlag hoping you saw my comment. This issue seems to be causing excess CPU usage. I'm happy to submit a PR if you would except it? I have simply just removed the offending line with the QueueProvider.QueueWork and that seems to be all that is needed but I'm not sure what your original intent was here.

  4. jlenk commented on Jul 8, 2026

    @jlenk

    removing that line is causing behavior problems with workflow execution. Looks like the intent of that code is to wait for the task to complete. Looking at ways to do that without polling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions