--- title: "Limiting Task Parallelism in Flow Runs" slug: "limiting-task-parallelism-in-flow-runs" updated: 2026-03-02T21:43:28Z published: 2026-03-02T21:43:28Z canonical: "help.hyperscience.ai/limiting-task-parallelism-in-flow-runs" --- > ## Documentation Index > Fetch the complete documentation index at: https://help.hyperscience.ai/llms.txt > Use this file to discover all available pages before exploring further. # Limiting Task Parallelism in Flow Runs Long-running transactions, such as those created by flow runs with many branches, can result in responsiveness issues across the system. For example, a flow run containing a large number of Fork or Foreach Blocks can create more tasks or subflow runs than the system can effectively process at once. In v42 and later, you can limit the number of branches that each flow run can have by adjusting the value of the `HYPERFLOW_ENGINE_MAX_PARALLEL_TASKS_PER_WORKFLOW` “.env” file variable: ```bash HYPERFLOW_ENGINE_MAX_PARALLEL_TASKS_PER_WORKFLOW= ``` If a flow run’s Fork or Foreach Blocks generate more than the maximum number of branches, the flow run will fail. The default value of `HYPERFLOW_ENGINE_MAX_PARALLEL_TASKS_PER_WORKFLOW` is `1000000` . Any edited value should be based on the amount of memory available in instance.