langflow-ai / langflow

⛓️ Langflow is a visual framework for building multi-agent and RAG applications. It's open-source, Python-powered, fully customizable, model and vector store agnostic.

Home Page:http://www.langflow.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

langflow build hangs

tejeshbhalla opened this issue · comments

Describe the bug
The build in langflow hangs for some reason randomly

Browser and Version

  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

To Reproduce
Steps to reproduce the behavior:
Leave langflow for few hours

The build process in Langflow may hang after being left idle for a few hours due to the default worker timeout setting. The timeout parameter in the run function is set to 300 seconds (5 minutes):

timeout: int = typer.Option(300, help="Worker timeout in seconds."),

This means that if a worker process is idle for more than 5 minutes, it may be terminated, potentially causing the build process to hang. You can increase the timeout value to prevent this from happening by setting a higher value for the timeout parameter when running the Langflow server. For example, you can set it to 3600 seconds (1 hour):

timeout: int = typer.Option(3600, help="Worker timeout in seconds."),

Adjust the timeout value according to your needs to ensure that the worker processes do not terminate prematurely [1].

Additionally, Langflow relies on several dependencies and external services during the build process that could cause it to hang if they become unresponsive. Specifically, the build process uses vite and several other dependencies listed in the package.json file. The build process also involves various Makefile targets that depend on external services and tools such as poetry, npm, and docker. If any of these dependencies or services become unresponsive, it could potentially cause the build process to hang [2][3][4][5].

To diagnose the issue further, you can check the logs generated during the build process. The logs and error messages are handled using the logger from the loguru library, which provides detailed information about the errors encountered [6].

Lastly, the Langflow repository has automated tests and CI/CD pipelines that could help identify why the build process hangs after being idle. These include targets for running tests and generating coverage reports, as well as GitHub Actions workflows for testing Docker images and pre-releasing Langflow [3][7][8][9][10].

To continue talking to Dosu, mention @dosu.

problem solved ?i have same problem

fix by pr #2218