-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Bug Description
Reproduction
- Create simple flow
- curl call api:
api/v1/build/47b14ff4-f165-44c5-af90-d6a742ff7f6f/flow
curl --location 'http://localhost:3000/api/v1/build/47b14ff4-f165-44c5-af90-d6a742ff7f6f/flow' \
--header 'x-api-key: sk-xxx-xxx' \
--header 'Content-Type: application/json' \
--data '{
"inputs": {
"input_value": "hello",
"session": "xxx"
}
}'
Expected behavior
Release unused db connection.
Who can help?
Operating System
mac
Langflow Version
v1.1.1
Python Version
3.12
Screenshot
Every curl will leak a db connection:
I debugged and found the problem is in build_flow->event_generator:

If not data, build_graph_and_get_order will run by asyncio.create_task, this will cause AsyncDbSession doesn't close.
If run build_graph_and_get_order directly with await, AsyncDbSession close correctly.
Flow File
No response
severfire
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
