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
35.07k stars 4.19k forks source link

LangFlow suddenly crashed and can no longer be started #4730

Open tzengshinfu opened 1 day ago

tzengshinfu commented 1 day ago

Bug Description

Yesterday, I started LangFlow inside a container and created two Vector Store RAG workflows: flow_1: Vectorized Markdown documents and wrote them into PGVector. flow_2: Matched user queries with PGVector to retrieve answers. Both workflows ran smoothly yesterday.

This morning, I discovered that LangFlow had suddenly crashed, and the log is as follows: langflow-crash.log(As seen at [11/20/24 09:39:20])

Even after deleting the vectorization records in PGVector, it still couldn't start successfully. Ultimately, I had to delete all the tables storing the vectorized document data to get it to start properly.

Reproduction

  1. Start LangFlow and PGVector (container settings are as shown in the attachment: docker-compose.yml.txt).
  2. Execute flow_1 to vectorize the file: 2024-11-19_07-29-59_20221117_edited.md and write it into PGVector.
  3. Execute flow_2 to ask a question; everything worked fine at this stage.
  4. After a while, LangFlow crashed on its own and could not be restarted properly.
  5. The memory usage of the host at the time was not significantly increasing but rather decreasing (as shown in the attachment: Memory_usage)

Expected behavior

Continues to run normally.

Who can help?

No response

Operating System

Ubuntu 22.04.5

Langflow Version

1.0.19 (docker)

Python Version

None

Screenshot

image_20241120_103531

Flow File

flow_1.json flow_2.json 2024-11-19_07-29-59_20221117_edited.md docker-compose.yml.txt langflow-crash.log Memory_usage

dosubot[bot] commented 1 day ago

Hey there, @tzengshinfu! I'm here to help you with any bugs, questions, or contributions you might have for LangFlow. Let's work together to solve this issue!

Langflow's crash and inability to restart could be related to several potential issues, especially when dealing with vector stores like PGVector. Here are some areas to investigate:

  1. Database Connection: Ensure that the connection to PGVector is stable and correctly configured. Connection issues can cause Langflow to crash if it cannot access the vector store.

  2. Data Integrity: Check for any data corruption in the vectorized documents stored in PGVector. Corrupted data might cause Langflow to fail during startup or operation.

  3. Resource Limits: Verify that the container has sufficient resources (CPU, memory) allocated. Insufficient resources can lead to crashes, especially when handling large datasets.

  4. Error Logs: Review the langflow-crash.log for specific error messages or exceptions that could provide more insight into the cause of the crash. Look for any stack traces or error codes that might indicate the problem.

  5. Configuration Issues: Double-check the docker-compose.yml and ensure all environment variables and configurations are set correctly. Misconfigurations can lead to unexpected behavior.

  6. Concurrency Settings: If you are using batch processing or concurrency settings, ensure they are configured correctly to avoid overwhelming the system.

If the issue persists, consider isolating the problem by running Langflow without PGVector to see if the crash still occurs, which can help determine if the issue is with the vector store interaction.

To continue talking to Dosu, mention @dosu.

italojohnny commented 9 hours ago

Hello, my friend. How are you? Could you let me know which version of Langflow you are using?

tzengshinfu commented 8 hours ago

Hello! I'm doing well, thank you. I'm currently using v1.19 and running it in a container.