Description
Seeing this error pop up in our logs
2024-09-26T18:36:47.646Z
Error finding nearest neighbors: Query call with protocol GRPC search failed with message <AioRpcError of RPC that terminated with:
status = StatusCode.UNAVAILABLE
details = “recvmsg:Connection reset by peer”
debug_error_string = “UNKNOWN:Error received from peer {created_time:“2024-09-26T18:36:47.646280137+00:00”, grpc_status:14, grpc_message:“recvmsg:Connection reset by peer”}”
Server Setup Information
- Weaviate Server Version: 1.26.4
- Deployment Method: Weaviate Cloud
- Multi Node? Number of Running Nodes: 1??
- Client Language and Version: Python
- Multitenancy?: No.
Any additional Information
Code where the error is populated:
def find_nearest_neighbors(item, settings):
vector_similarity = settings[“vector_similarity”]
matching_vectors = settings[“matching_vectors”]
try:
description = item["description"]
item_id = item["id"] if "id" in item else item["item_id"]
embedding = get_embedding(description)
collection = vector_client.collections.get("items")
if embedding is None:
raise ValueError("No embedding found for item")
results = collection.query.near_vector(
near_vector=embedding,
certainty=vector_similarity,
filters=Filter.by_property("item_id").not_equal(item_id),
return_metadata=wvc.query.MetadataQuery(certainty=True),
limit=matching_vectors
)
items_dict_list = [item.properties for item in results.objects]
return items_dict_list
except Exception as e:
print(f"Error finding nearest neighbors: {e}")
return []