I am in the process of migrating weaviate client from v3 to v4 and I am using haystack to integrate weaviate for my usecase. However when querying on collection using filters, I am getting the following grpc error
WeaviateQueryError: Query call with protocol GRPC search failed with message <AioRpcError of RPC that terminated with:
status = StatusCode.RESOURCE_EXHAUSTED
details = "grpc: trying to send message larger than max (486438681 vs. 104858000)"
debug_error_string = "UNKNOWN:Error received from peer {grpc_message:"grpc: trying to send message larger than max (486438681 vs. 104858000)", grpc_status:8, created_time:"2024-08-15T18:22:12.13303888+00:00"}"
Here is the haystack link to query with filters. Haystack
I am filtering on a very small subset of documents in index and I see this error trying to get anything over 70-80 documents.
I also did increase my timeout config to 600 sec. With default timeout config, I can hardly query 5 docs.
On the flip side, When i extract ALL the documents in the index using
collection.iterator(include_vector=False, return_properties=properties) it returns the result. The index has document size about 9000 and return all of them without throwing an error.
It just with filtering, the underlying query.fecth_objects function is failing the request.
How big are your objects? You can set which objects are returned using return_properties=[“prop1”,…]. by default all non-blob properties are returned
Sorry for delayed response. Realized one of the properties being queried from weaviate (using haystack) is a metadata field that is quite large. Excluding that solved this error.
Why is the GRPC MAX_GRPC_MESSAGE_LENGTH hardcoded on both weaviate core and client? I have a simple weaviate object with two properties, title and poster. My avg images are around 3 mb. When i try indexing using batch.dynamic() i see the same error described in this thread. Using batch.fixed() is a hacky workaround which can fail. It seems like such a basic feature. Not to mention we have been bottlenecked and forced to abandon Weaviate just because of this issue.
Using the fixed size batch is not a hacky solution at all.
the dynamic size batch will calculate the amount of objects to send based on the latency of the connection to the server.
However, if your objects are big (for example, images), the size of your batches shouldn’t be defined by the number of objects to send, but by the size of each objects that are being sent.
On that case, using fixed size is more interesting, as you have a clear control of the size of the batch, and avoid to have a few big sized batches in favor of correctly sized batches depending on your objects.
Also, given enough resources, that is not a bottleneck, as you can increase the concurrent requests and have enough nodes on a cluster that can handle the load of your data.
Nevertheless, the 10 mb harcoded limit still applies, right? If each of my image is >10 mb would I be able to import even with a fixed batch size of 1? My point is why is MAX_GRPC_MESSAGE_LENGTH hardcoded in the python client (weaviate/connect/base.py) and server side? Why is this not a variable in docker compose since it is technically possible to set the max message size?