Node Limit Error: "Maximum limit per branch is 50 nodes" when Publishing #7067

Closed
opened 2026-02-21 18:18:41 -05:00 by yindo · 3 comments
Owner

Originally created by @WarriorMama777 on GitHub (Dec 5, 2024).

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

0.10.1

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

Issue Description

When attempting to publish my application in Dify, I encountered an error message stating "Maximum limit per branch is 50 nodes". This prevents me from publishing the application successfully.

Environment

  • Deployment Method: Docker (Local deployment)
  • Installation Type: Self-hosted
  • DifyVersion: Version 0.10.1

Current workflow

The current workflow is relatively large and complex.

Expected Behavior

Being able to publish the application without encountering the node limit error.

Current Behavior

Receiving an error message about node limit (50 nodes per branch), which blocks the publishing process.

What I've Tried

In previous cases with other limitations, I was able to modify restrictions by editing the docker-compose.yaml file (such as adjusting TEMPLATE_TRANSFORM_MAX_LENGTH). However, I cannot find any configuration option related to this node limit restriction.

Additional Information

  • This issue occurred during the publishing step
  • Using local Docker deployment setup
  • Already checked docker-compose configuration options

Questions

  1. Is this a known limitation for self-hosted deployments?
  2. Are there any workarounds or solutions to handle more than 50 nodes?
  3. Is this limit configurable in the settings or through environment variables?
  4. If configurable, which specific setting should be modified in the docker-compose file?

Any assistance or clarification would be greatly appreciated.

✔️ Expected Behavior

No response

Actual Behavior

No response

Originally created by @WarriorMama777 on GitHub (Dec 5, 2024). ### Self Checks - [X] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [X] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [X] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [X] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [X] Please do not modify this template :) and fill in all the required fields. ### Dify version 0.10.1 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce ### Issue Description When attempting to publish my application in Dify, I encountered an error message stating "Maximum limit per branch is 50 nodes". This prevents me from publishing the application successfully. ### Environment - Deployment Method: Docker (Local deployment) - Installation Type: Self-hosted - DifyVersion: Version 0.10.1 ### Current workflow The current workflow is relatively large and complex. ![](https://i.imgur.com/F8a0WPV.jpeg) ### Expected Behavior Being able to publish the application without encountering the node limit error. ### Current Behavior Receiving an error message about node limit (50 nodes per branch), which blocks the publishing process. ### What I've Tried In previous cases with other limitations, I was able to modify restrictions by editing the `docker-compose.yaml` file (such as adjusting `TEMPLATE_TRANSFORM_MAX_LENGTH`). However, I cannot find any configuration option related to this node limit restriction. ### Additional Information - This issue occurred during the publishing step - Using local Docker deployment setup - Already checked docker-compose configuration options ### Questions 1. Is this a known limitation for self-hosted deployments? 2. Are there any workarounds or solutions to handle more than 50 nodes? 3. Is this limit configurable in the settings or through environment variables? 4. If configurable, which specific setting should be modified in the docker-compose file? Any assistance or clarification would be greatly appreciated. ### ✔️ Expected Behavior _No response_ ### ❌ Actual Behavior _No response_
yindo added the 🐞 bug label 2026-02-21 18:18:41 -05:00
yindo closed this issue 2026-02-21 18:18:41 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Dec 5, 2024):

Hey @WarriorMama777! I'm here to help you with bug fixes, answer questions, and even guide you on becoming a contributor. Let's work together to solve this issue!

I found a similar discussion regarding the "Maximum limit per branch is 50 nodes" error, which is currently unsolved [1].

To work around this issue in a self-hosted Dify setup using Docker, you can manually adjust the node limit by modifying the MAX_TREE_DEPTH in the web/app/components/workflow/constants.ts file. The default value is set to 50, but you can increase it to accommodate more complex workflows. Keep in mind that increasing this limit may impact performance [2].

To continue talking to Dosu, mention @dosu.

@dosubot[bot] commented on GitHub (Dec 5, 2024): <!-- Greeting --> Hey @WarriorMama777! I'm here to help you with bug fixes, answer questions, and even guide you on becoming a contributor. Let's work together to solve this issue! <!-- Answer --> I found a similar discussion regarding the "Maximum limit per branch is 50 nodes" error, which is currently unsolved <sup>[[1]](https://github.com/langgenius/dify/discussions/11363)</sup>. To work around this issue in a self-hosted Dify setup using Docker, you can manually adjust the node limit by modifying the `MAX_TREE_DEPTH` in the `web/app/components/workflow/constants.ts` file. The default value is set to 50, but you can increase it to accommodate more complex workflows. Keep in mind that increasing this limit may impact performance <sup>[[2]](https://github.com/langgenius/dify-docs/blob/main/jp/getting-started/install-self-hosted/faq.md)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
Author
Owner

@crazywoola commented on GitHub (Dec 5, 2024):

You can wrap some nodes in another workflow to avoid this error.

@crazywoola commented on GitHub (Dec 5, 2024): You can wrap some nodes in another workflow to avoid this error.
Author
Owner

@WarriorMama777 commented on GitHub (Dec 5, 2024):

@dosu

To work around this issue in a self-hosted Dify setup using Docker, you can manually adjust the node limit by modifying the MAX_TREE_DEPTH in the web/app/components/workflow/constants.ts file. The default value is set to 50, but you can increase it to accommodate more complex workflows.

I confirmed that the relevant entry exists in dify\web\app\components\workflow\constants.ts.
I made the following change:
export const MAX_TREE_DEPTH = 50

export const MAX_TREE_DEPTH = 200

After that, I tried the following Docker operations, but I'm still getting the error "Maximum limit per branch is 50 nodes", suggesting that the modification to constants.ts hasn't been reflected.

docker compose down
docker compose up -d

How can I make these changes take effect?

@WarriorMama777 commented on GitHub (Dec 5, 2024): @dosu > To work around this issue in a self-hosted Dify setup using Docker, you can manually adjust the node limit by modifying the MAX_TREE_DEPTH in the web/app/components/workflow/constants.ts file. The default value is set to 50, but you can increase it to accommodate more complex workflows. I confirmed that the relevant entry exists in dify\web\app\components\workflow\constants.ts. I made the following change: `export const MAX_TREE_DEPTH = 50` ↓ `export const MAX_TREE_DEPTH = 200` After that, I tried the following Docker operations, but I'm still getting the error "Maximum limit per branch is 50 nodes", suggesting that the modification to constants.ts hasn't been reflected. ``` docker compose down docker compose up -d ``` How can I make these changes take effect?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#7067