Hi , configured batch on
client.batch.configure(batch_size=100,dynamic=True,consistency_level=“ALL”,connection_error_retries=3,num_workers=2)
perform batch insertion and getting exception
UnexpectedStatusCodeException: batch response! Unexpected status code: 500, with response body: {‘error’: [{‘message’: ‘batch objects: &fmt.wrapError{msg:“cannot process batch: not enough memory”, err:(*errors.errorString)(0xc00004c020)}’}]}.
Weaviate version :1.23.11
Deployment type: Kubernetes cluster
Python client : 3.24.2
available memory per container: 4GB
Also, does the server has enough memory considering the amount of objects to be ingested?
And finally, does it happens if you reduce the batch size?
If you try to the python v4 client, I suggest using the dynamic batch size, so Weaviate server can adjust the batch size while communicating with the client.
In order to mitigate this, some recommendations would be upgrading to latest version (a lot have improved from from 1.24 to 1.28). Also, we need to be aware that while ingesting data with vectors, Weaviate will also index that data, while write it accordingly. For example, Weaviate 1.28 version, that was just released, had some interesting improvements on ASYNC_INDEXING
So allocating more memory so the ingestion can happen smoothly is an option.
Another route here is to enable ASYNC_INDEXING. This will allow Weaviate to “take it’s time” to index everything and will also make the ingestion process quicker, as it will not perform the indexing right away, but asynchronously.
Hey @DudaNogueira ,
Thanks for responding to this.
Let me try setting the ASYNC_INDEXING config to true and see if this improved as I see it’s available from 1.22.
If not, I’ll try upgrading to 1.28.
Hello @DudaNogueira,
I have set the ASYNC_INDEXING to true and also upgraded weaviate to 1.28, however the issue still seems to persist.
Can you help please?
FYI - my client version is: 3.24.1 (Python SDK)
Some logs from weaviate that could be of any help:
cannot load vector into cache due to memory pressure
find and connect neighbors: at level 0: search layer at level 0: calculate distance between candidate and query: not enough memory