Editing application information without passing max_active_requests on the interface request will cause the max_active_requests already set to null. #11956

Closed
opened 2026-02-21 19:04:58 -05:00 by yindo · 1 comment
Owner

Originally created by @jiangbo721 on GitHub (Mar 21, 2025).

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

1.0.0

Cloud or Self Hosted

Self Hosted (Source)

Steps to reproduce

Editing application information without passing max_active_requests on the interface request will cause the max_active_requests already set to null.

Image

✔️ Expected Behavior

No response

Actual Behavior

No response

Originally created by @jiangbo721 on GitHub (Mar 21, 2025). ### 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 1.0.0 ### Cloud or Self Hosted Self Hosted (Source) ### Steps to reproduce Editing application information without passing max_active_requests on the interface request will cause the max_active_requests already set to null. ![Image](https://github.com/user-attachments/assets/20b341ad-e93e-4989-a3e3-70cf94659217) ### ✔️ Expected Behavior _No response_ ### ❌ Actual Behavior _No response_
yindo added the 🐞 bug label 2026-02-21 19:04:58 -05:00
yindo closed this issue 2026-02-21 19:04:58 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Mar 21, 2025):

To prevent max_active_requests from being set to null when editing application information without passing it on the interface request in Dify version 1.0.0, ensure that the max_active_requests attribute in the App model is either set to a default value or is retrieved using the _get_max_active_requests method. This method assigns a default value from dify_config.APP_MAX_ACTIVE_REQUESTS if it is None. Here's the relevant code snippet:

@staticmethod
def _get_max_active_requests(app_model: App) -> int:
    max_active_requests = app_model.max_active_requests
    if max_active_requests is None:
        max_active_requests = int(dify_config.APP_MAX_ACTIVE_REQUESTS)
    return max_active_requests

Make sure this method is used whenever max_active_requests is needed, and ensure that dify_config.APP_MAX_ACTIVE_REQUESTS is properly configured [1].

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

@dosubot[bot] commented on GitHub (Mar 21, 2025): <!-- Answer --> To prevent `max_active_requests` from being set to null when editing application information without passing it on the interface request in Dify version 1.0.0, ensure that the `max_active_requests` attribute in the `App` model is either set to a default value or is retrieved using the `_get_max_active_requests` method. This method assigns a default value from `dify_config.APP_MAX_ACTIVE_REQUESTS` if it is `None`. Here's the relevant code snippet: ```python @staticmethod def _get_max_active_requests(app_model: App) -> int: max_active_requests = app_model.max_active_requests if max_active_requests is None: max_active_requests = int(dify_config.APP_MAX_ACTIVE_REQUESTS) return max_active_requests ``` Make sure this method is used whenever `max_active_requests` is needed, and ensure that `dify_config.APP_MAX_ACTIVE_REQUESTS` is properly configured <sup>[[1]](https://github.com/langgenius/dify/blob/main/api/services/app_generate_service.py)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/a6110144-ef00-4e1d-a171-55d1ac607000?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/a6110144-ef00-4e1d-a171-55d1ac607000?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/a6110144-ef00-4e1d-a171-55d1ac607000?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/a6110144-ef00-4e1d-a171-55d1ac607000?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/a6110144-ef00-4e1d-a171-55d1ac607000?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/a6110144-ef00-4e1d-a171-55d1ac607000?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/a6110144-ef00-4e1d-a171-55d1ac607000?feedback_type=other)</sup>
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#11956