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

Can't modify worker timeout #4570

Open
cimuletz opened this issue Nov 13, 2024 · 2 comments
Open

Can't modify worker timeout #4570

cimuletz opened this issue Nov 13, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@cimuletz
Copy link

Bug Description

Can't modify worker timeout, neither by CLI (using --worker-timeout 30) nor by env variable (LANGFLOW_WORKER_TIMEOUT=30).

Reproduction

  1. Add custom component to a flow
  2. Add 300+ seconds of sleep inside component code
  3. Run
  4. Flow doesn't timeout after 300s, runs indefinetely

Expected behavior

Flow should timeout after default timeout of 300s, or earlier if setting worker timeout to a lower value.

Who can help?

@italojohnny @ogabrielluiz @nicoloboschi

Operating System

Ubuntu Linux

Langflow Version

1.0.19

Python Version

None

Screenshot

No response

Flow File

No response

@cimuletz cimuletz added the bug Something isn't working label Nov 13, 2024
Copy link

dosubot bot commented Nov 13, 2024

The issue you're experiencing with the worker timeout not being applied could be due to several factors. Here are a few things to check and try:

  1. Ensure Correct Environment Variable Usage: Make sure that the LANGFLOW_WORKER_TIMEOUT environment variable is set correctly in your environment. You can verify this by printing the environment variable before running Langflow to ensure it's being recognized.

  2. CLI Argument Precedence: When using the CLI argument --worker-timeout, ensure that it is correctly passed in the command. The CLI argument should override the environment variable if both are set.

  3. Check for Overrides: Verify if there are any configurations or conditions in your setup that might override the timeout settings. Although I couldn't find specific conditions in the codebase that might override the worker timeout, it's worth checking your setup for any custom configurations.

  4. Logging for Debugging: Utilize the logging capabilities in Langflow to diagnose the issue. Set the log level to DEBUG using the LANGFLOW_LOG_LEVEL environment variable to capture detailed logs that might provide insights into why the timeout is not being applied [1].

  5. Review Code for Timeout Application: Ensure that the timeout is being correctly applied in the code. The timeout parameter should be set in the options dictionary when configuring the server process [2].

If these steps do not resolve the issue, it might be helpful to review any recent changes in the codebase or consult with the maintainers mentioned in your message for further assistance.

To continue talking to Dosu, mention @dosu.

@cimuletz
Copy link
Author

cimuletz commented Nov 15, 2024

It seems that the worker_timeout variable is set in main; it is set into the 'options' dict which is passed to the LangflowServer process but it is never accessed. @joaoguilhermeS @ogabrielluiz

@italojohnny italojohnny self-assigned this Nov 19, 2024
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

3 participants