Closed zhaojunfeng closed 4 months ago
Hey there @zhaojunfeng! Great to see you diving into another challenge with quivr. Let's tackle this together! π
The "httpx.ReadTimeout: timed out" error you're experiencing when trying to use the 'match_brain' rpc on quivr deployed on a host with IP '192.168.1.84' suggests a timeout issue during a network request. This error is not directly related to the ability to create a new brain or upload documents successfully, as those operations might not require the same amount of time or resources.
Given the context provided, there's no explicit mention of a 'match_brain' rpc call or its implementation details within the provided code snippet. However, the error message indicates that the issue lies in a network request that takes too long to complete, possibly due to:
To address this issue, consider the following steps, although specific code changes cannot be provided due to the lack of direct references in the provided context:
httpx.get
or httpx.post
, you can specify a timeout parameter like httpx.get('https://example.com', timeout=30.0)
to increase the timeout to 30 seconds.Without specific details on the implementation of the 'match_brain' rpc call or the configuration of the httpx client within your application, these are general recommendations to address the timeout issue.
Regarding the similar issues in the quivr repository, there was a closed issue [Issue] Networking Issues with self-hosted Supabase docker-compose and self-hosted docker-compose Quivr on host. which was last updated on January 04, 2024. This issue was referenced by:
I finally got it working, but the networking was non-intuitive for self-hosting Supabase & Quivr on the same box.
Although the user did not provide the exact steps they took to resolve the issue, this comment indicates that they were able to solve the networking issues encountered when self-hosting Supabase and Quivr on the same machine. Other users experiencing similar problems may need to reach out directly to the user for a detailed solution or explore networking configurations that allow docker containers to communicate with the host machine or with each other.
I hope this information helps. If you need further assistance, please provide more details about your setup and the steps you've taken so far.
after add the below code in settings.py: supabase_client: Client = create_client( settings.supabase_url, settings.supabase_service_key, ClientOptions(storage_client_timeout=60, postgrest_client_timeout=60) )
new error messages:
2024-03-24T09:02:05.752157654Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-03-24T09:02:05.752166189Z File "/code/modules/brain/service/brain_service.py", line 109, in find_brain_from_question 2024-03-24T09:02:05.752175101Z list_brains = vector_store.find_brain_closest_query(user.id, question) 2024-03-24T09:02:05.752183658Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-03-24T09:02:05.752192054Z File "/code/vectorstore/supabase.py", line 54, in find_brain_closest_query 2024-03-24T09:02:05.752200523Z ).execute() 2024-03-24T09:02:05.752209029Z ^^^^^^^^^ 2024-03-24T09:02:05.752216912Z File "/usr/local/lib/python3.11/site-packages/postgrest/_sync/request_builder.py", line 127, in execute 2024-03-24T09:02:05.752227087Z raise APIError(r.json()) 2024-03-24T09:02:05.752240378Z postgrest.exceptions.APIError: {'code': 'PGRST001', 'details': 'no connection to the server\n', 'hint': None, 'message': 'Database client error. Retrying the connection.'}
Thanks for your contributions, we'll be closing this issue as it has gone stale. Feel free to reopen if you'd like to continue the discussion.
What happened?
input any question, self._client.rpc 'match_brain', timeout exption. I deployed quivr on a host with ip '192.168.1.84', not in my local pc. But I can create new brain and upload document successfullly.
Relevant log output
Twitter / LinkedIn details
No response