Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wrong config .env APP_MAX_EXECUTION_TIME #14410

Closed
5 tasks done
strivezheng opened this issue Feb 26, 2025 · 3 comments
Closed
5 tasks done

wrong config .env APP_MAX_EXECUTION_TIME #14410

strivezheng opened this issue Feb 26, 2025 · 3 comments
Labels
🐞 bug Something isn't working

Comments

@strivezheng
Copy link

strivezheng commented Feb 26, 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

0.15.3

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

when i set the config fields,APP_MAX_EXECUTION_TIME
in the .env file, it says

  # The maximum number of active requests for the application, where 0 means unlimited, should be a non-negative integer.
APP_MAX_ACTIVE_REQUESTS=0
APP_MAX_EXECUTION_TIME=0

but it's wrong:

File "/app/api/.venv/lib/python3.12/site-packages/pydantic/main.py", line 212, in __init__
    validated_self = self.__pydanti

APP_MAX_EXECUTION_TIME
  Input should be greater than 0 [type=greater_than, input_value='0', input_type=str]
  For further information visit https://errors.pydantic.dev/2.9/v/greater_than

✔️ Expected Behavior

0 means unlimited

❌ Actual Behavior

File "/app/api/.venv/lib/python3.12/site-packages/pydantic/main.py", line 212, in init
validated_self = self.__pydanti

APP_MAX_EXECUTION_TIME
Input should be greater than 0 [type=greater_than, input_value='0', input_type=str]
For further information visit https://errors.pydantic.dev/2.9/v/greater_than

Copy link

dosubot bot commented Feb 26, 2025

@strivezheng Hello there! I'm here to help you with any bugs, questions, or contributions. Let's tackle this issue together while we wait for a human maintainer.

The APP_MAX_EXECUTION_TIME configuration in the Dify application must be set to a positive integer greater than 0. Setting it to 0 is not allowed, as the application requires a positive value to define the maximum execution time. If you want to set a specific execution time, you can use a value like 1200 seconds, which is the default [1][2].

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 dosubot bot added the 🐞 bug Something isn't working label Feb 26, 2025
@crazywoola
Copy link
Member

class AppExecutionConfig(BaseSettings):
"""
Configuration parameters for application execution
"""
APP_MAX_EXECUTION_TIME: PositiveInt = Field(
description="Maximum allowed execution time for the application in seconds",
default=1200,
)
APP_MAX_ACTIVE_REQUESTS: NonNegativeInt = Field(
description="Maximum number of concurrent active requests per app (0 for unlimited)",
default=0,
)

@crazywoola
Copy link
Member

crazywoola commented Feb 26, 2025

> # The maximum number of active requests for the application, where 0 means unlimited, should be a non-negative integer.

APP_MAX_ACTIVE_REQUESTS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants