You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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.
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.
@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.
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.
Activity
vpandev commentedon Apr 28, 2025
@danielgerlag could you help me, thanks a lot.
jlenk commentedon Jul 1, 2026
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.
jlenk commentedon Jul 6, 2026
@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.
jlenk commentedon Jul 8, 2026
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.