Replies: 12 comments
-
|
When you added data with cognee-cli was ENABLE_BACKEND_ACCESS_CONTROL set to false? |
Beta Was this translation helpful? Give feedback.
-
|
or only for the backend server |
Beta Was this translation helpful? Give feedback.
-
|
Because adding and cognifying data also must be run with ENABLE_BACKEND_ACCESS_CONTROL set to false (we use separate storage systems depending if the mode is turned on or off) |
Beta Was this translation helpful? Give feedback.
-
|
and with Cognee v0.5.0 ENABLE_BACKEND_ACCESS_CONTROL=true is the default |
Beta Was this translation helpful? Give feedback.
-
|
Yep, that must be the reason. Thanks. And,, do you know what the recommended approach is when a lock issue occurs? |
Beta Was this translation helpful? Give feedback.
-
|
adding ENABLE_BACKEND_ACCESS_CONTROL=false in add script is not seems to work.
and return is |
Beta Was this translation helpful? Give feedback.
-
|
Best way to resolve the issue is to just run the Cognee backend server and all requests through it (add cognify and etc.) As there would be just one Kuzu adapter that communicates with the database and handle the lock files If you need to run it with the cognee cli you can use the redis lock mechanism: https://docs.cognee.ai/core-concepts/sessions-and-caching So all requests for Kuzu would go through a redis queue but that is a bit more complicated to setup |
Beta Was this translation helpful? Give feedback.
-
|
I will try it out and check |
Beta Was this translation helpful? Give feedback.
-
|
Thanks! As suggested, I’ll refactor my scripts to use a unified HTTP API and will update you if the issue is resolved. |
Beta Was this translation helpful? Give feedback.
-
|
<@508682252595626015> I assume we can't use kuzu lock from pure sdk? |
Beta Was this translation helpful? Give feedback.
-
|
In this case we can't as the cognee-cli spawns multiple processes of Cognee that have different Kuzu adapter handlers and it has to be a singleton to avoid the locks, so we can either handle it with Laszlo's Redis Queue as it handles read/write operations for kuzu as a singleton (no two requests can come at the same time to the Kuzu DB) or by having users use Cognee as a backend to handle all requests as then Kuzu is handled through our singleton adapter |
Beta Was this translation helpful? Give feedback.
-
|
But just using one Cognee instance with SDK that is also fine, the problem is that cognee-cli spawns new Cognee instances If we can get cognee-cli to reuse cognee processes that would work |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
=1. Added data with
cognee-cli data data_dir&&cognee-cli cognify2. run the backend server with
ENABLE_BACKEND_ACCESS_CONTROL=false REQUIRE_AUTHENTICATION=false cognee-cli -ui3. query with curl command
and it returns
["The document contains no nodes or connections — the provided knowledge-graph context is empty."]However with
cognee-cli search "What is in the document?"returns withWhat do I have to do to get the proper search result with HTTP API?
(using cognee==0.5.0)
This discussion was automatically pulled from Discord.
Beta Was this translation helpful? Give feedback.
All reactions