-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Bug Description
Bug Description
When using FalkorDB with Cognee, the prune_system() operation fails with redis.exceptions.ResponseError: unknown command 'GRAPH.LIST' because the create_graph_engine() function doesn't pass the graph_database_port parameter to FalkorDB adapters.
Root Cause
In cognee/infrastructure/databases/graph/get_graph_engine.py, the create_graph_engine() function creates FalkorDB adapters using:
return adapter(
graph_database_url=graph_database_url,
graph_database_username=graph_database_username,
graph_database_password=graph_database_password,
database_name=graph_database_name,
)But it's missing the graph_database_port parameter. The FalkorDBAdapter.__init__() defaults to port 6379, but users may configure different ports.
Workaround
Skip the prune operations or modify Docker port mapping to use 6379.
Steps to Reproduce
- Set up FalkorDB in Docker with port mapping (e.g.,
6380:6379) - Configure Cognee to use FalkorDB with custom port:
config.set_graph_db_config({ "graph_database_provider": "falkor", "graph_database_url": "host.docker.internal", "graph_database_port": "6380", # Custom port # ... other config })
- Call
await cognee.prune.prune_system(metadata=True)
Expected Behavior
The prune operation should work correctly and clean up graphs using the configured port.
Actual Behavior
Fails with:
redis.exceptions.ResponseError: unknown command 'GRAPH.LIST', with args beginning with:
Environment
- Cognee version: 0.5.2
- FalkorDB version: 1.6.7
- Python version: 3.11
- Docker setup: FalkorDB container mapped to host port 6380
Logs/Error Messages
Additional Context
Direct FalkorDB connection works fine:
from falkordb import FalkorDB
client = FalkorDB(host="host.docker.internal", port=6380)
print(client.list_graphs()) # Works: ['doc_graph_rag']The issue occurs specifically during prune operations when a new graph engine is created for dataset deletion.
Pre-submission Checklist
- I have searched existing issues to ensure this bug hasn't been reported already
- I have provided a clear and detailed description of the bug
- I have included steps to reproduce the issue
- I have included my environment details