langflow-ai / langflow

Langflow is a low-code app builder for RAG and multi-agent AI applications. It’s Python-based and agnostic to any model, API, or database.
http://www.langflow.org
MIT License
28.25k stars 3.65k forks source link

Building takes for ever #3447

Closed mirzanejad closed 1 week ago

mirzanejad commented 3 weeks ago

Hello,

I am using LangFlow on Coolify using 2 vCPUs, 4096.00 MB, and 80 GB SSD on Ubuntu 24.04. The issue I have is that even the simplest flows take for ever to build. I am wondering what could be the issue?

Thanks!

dosubot[bot] commented 3 weeks ago

Hello @mirzanejad! I'm here to help with any issues you encounter. Let's work together to solve this problem.

The simplest flows in LangFlow on Coolify might take a long time to build due to several factors:

  1. Graph Building Process: The stream_build function iterates over each vertex and builds it, which can be time-consuming depending on the complexity and number of nodes in the graph [1].

  2. Task Execution: The try_running_celery_task function attempts to run tasks using Celery. If Celery is not properly configured or if there are issues with task execution, it falls back to running tasks locally, which can be slower [1].

  3. Resource Constraints: Even with 2 vCPUs, 4096 MB RAM, and 80 GB SSD, performance can be affected by the efficiency of the code and the overhead of running multiple services (e.g., FastAPI, Celery) [1].

  4. Logging and Exception Handling: Extensive logging and exception handling within the build process can also add to the time taken to build flows [1].

These factors combined can contribute to the long build times for even the simplest flows in LangFlow on Coolify.

To continue talking to Dosu, mention @dosu.

italojohnny commented 2 weeks ago

Hi, @mirzanejad . I hope you're doing well.

We're very interested in this type of issue since other users have reported similar problems, and it’s quite difficult to reproduce them.

I tried to emulate your issue using a container with the same CPU and RAM restrictions, but it worked fine for me.

Could you help us by enabling the log level to debug by setting the environment variable LANGFLOW_LOG_LEVEL=debug and providing us with the output when you notice this slowdown?

carlosrcoelho commented 1 week ago

Thank you for your contribution! This issue will be closed. If you have any questions or encounter another problem, please open a new issue and we will be ready to assist you.