Can't modify worker timeout
Bug Description
Can't modify worker timeout, neither by CLI (using --worker-timeout 30) nor by env variable (LANGFLOW_WORKER_TIMEOUT=30).
Reproduction
- Add custom component to a flow
- Add 300+ seconds of sleep inside component code
- Run
- 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
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:
-
Ensure Correct Environment Variable Usage: Make sure that the
LANGFLOW_WORKER_TIMEOUTenvironment 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. -
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. -
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.
-
Logging for Debugging: Utilize the logging capabilities in Langflow to diagnose the issue. Set the log level to DEBUG using the
LANGFLOW_LOG_LEVELenvironment variable to capture detailed logs that might provide insights into why the timeout is not being applied [1]. -
Review Code for Timeout Application: Ensure that the timeout is being correctly applied in the code. The
timeoutparameter should be set in theoptionsdictionary 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.
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
Hi @italojohnny , any updates/advice on this issue?
Hi, @cimuletz. I'm Dosu, and I'm helping the langflow team manage their backlog. I'm marking this issue as stale.
Issue Summary:
- You reported an issue with Langflow where the worker timeout cannot be modified, causing flows to run indefinitely.
- Attempts to set the timeout via CLI or environment variables have not resolved the issue on Ubuntu Linux with Langflow version 1.0.19.
- Suggested troubleshooting steps included checking environment variables, CLI argument precedence, and logging for debugging.
- You noted that the
worker_timeoutis set but never accessed in the code. - You reached out to contributors @joaoguilhermeS, @ogabrielluiz, and @italojohnny for further assistance.
Next Steps:
- Please let us know if this issue is still relevant to the latest version of the langflow repository by commenting on this issue.
- If I do not hear back, this issue will be automatically closed in 7 days.
Thank you for your understanding and contribution!