# Weaviate Cloud Serverless - Batch Insert 502 Server Side errors with v4 client

**URL:** <https://forum.weaviate.io/t/weaviate-cloud-serverless-batch-insert-502-server-side-errors-with-v4-client/3909>\
**Category:** Support\
**Created:** [August 29, 2024, 12:54pm UTC](https://forum.weaviate.io/t/weaviate-cloud-serverless-batch-insert-502-server-side-errors-with-v4-client/3909 "2024-08-29T12:54:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![JK\_Rider](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/jk_rider/32/1671_2.png) [@JK\_Rider](https://forum.weaviate.io/u/JK_Rider)\
**Post date:** [August 29, 2024, 12:54pm UTC](https://forum.weaviate.io/t/weaviate-cloud-serverless-batch-insert-502-server-side-errors-with-v4-client/3909/1 "2024-08-29T12:54:28Z")

</div>

### Description

When inserting a large number of objects(\> 1M total vectors) with a batch insert I’ve been intermittently getting  
the error.

{‘message’: ‘Failed to send x objects in a batch of x. Please inspect client.batch.failed\_objects or collection.batch.failed\_objects for the failed objects.’}

Insertion Code:  
with self.collection.batch.fixed\_size(batch\_size=300)as batch:  
for i, data\_row in enumerate(property\_rows):  
batch.add\_object(  
properties=data\_row,  
vector={  
“title\_vector”: title\_vectors[i],  
“body\_vector”: body\_vectors[i],  
“keywords\_vector”: keyword\_vectors[i],  
},  
uuid=generate\_uuid5(data\_row[‘ext\_id’])  
)

Connection Code:

self.client = weaviate.connect\_to\_wcs(  
cluster\_url=URL,  
auth\_credentials=weaviate.auth.AuthApiKey(APIKEY),  
additional\_config=AdditionalConfig(  
connection=ConnectionConfig(  
session\_pool\_connections=30,  
session\_pool\_maxsize=200,  
session\_pool\_max\_retries=3,  
),  
timeout=Timeout(init=1440, query=1440, insert=1440) # Values in seconds  
)  
)

Errors:

WeaviateBatchError(‘Query call with protocol GRPC batch failed with message \<AioRpcError of RPC that terminated with:\n\tstatus = StatusCode.UNAVAILABLE\n\tdetails = “Received http2 header with status: 502”\n\tdebug\_error\_string = “UNKNOWN:Error received from peer {created\_time:“2024-08-29T08:31:03.197046647+00:00”, grpc\_status:14, grpc\_message:“Received http2 header with status: 502”}”\n\>.’)

WeaviateBatchError(‘Query call with protocol GRPC batch failed with message \<AioRpcError of RPC that terminated with:\n\tstatus = StatusCode.UNAVAILABLE\n\tdetails = “recvmsg:Connection reset by peer”\n\tdebug\_error\_string = “UNKNOWN:Error received from peer {created\_time:“2024-08-28T23:03:28.550055837+00:00”, grpc\_status:14, grpc\_message:“recvmsg:Connection reset by peer”}”\n\>.’)

\<AioRpcError of RPC that terminated with:\n\tstatus = StatusCode.UNAVAILABLE\n\tdetails = “sendmsg: Broken pipe (32)”\n\tdebug\_error\_string = “UNKNOWN:Error received from peer {created\_time:“2024-08-28T18:23:59.686140478+00:00”, grpc\_status:14, grpc\_message:“sendmsg: Broken pipe (32)”}”\n\>

### Server Setup Information

- Weaviate Server Version: 1.25.10
- Deployment Method: Weaviate Serverless Cloud
- Multi Node? Number of Running Nodes:
- Client Language and Version: Python v4 Client
- Multitenancy?: No

### Any Additional Information

No vectorizer is being used, objects are being sent with preloaded embeddings. There are multiple-named vectors in this collection.  
Asynchronous Indexing is Enabled

---

<div class="post-metadata">

**Author:** ![Shahin](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/shahin/32/7944_2.png) [@Shahin](https://forum.weaviate.io/u/Shahin)\
**Post date:** [August 29, 2024, 3:23pm UTC](https://forum.weaviate.io/t/weaviate-cloud-serverless-batch-insert-502-server-side-errors-with-v4-client/3909/2 "2024-08-29T15:23:41Z")

</div>

Hi @JK_Rider, how are you?

Thank you very much for the details. I see you have opened a support ticket with us as well.

I will investigate and get back to you there.

Regards,  
Mohamed

---

<div class="post-metadata">

**Author:** ![Shahin](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/shahin/32/7944_2.png) [@Shahin](https://forum.weaviate.io/u/Shahin)\
**Post date:** [August 29, 2024, 3:51pm UTC](https://forum.weaviate.io/t/weaviate-cloud-serverless-batch-insert-502-server-side-errors-with-v4-client/3909/3 "2024-08-29T15:51:05Z")

</div>

Hi @JK_Rider,

I’ve reached out to you over the Supprt Channel. Let’s take it from there.

Have a good evening!

---

<div class="post-metadata">

**Author:** ![JK\_Rider](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/jk_rider/32/1671_2.png) [@JK\_Rider](https://forum.weaviate.io/u/JK_Rider)\
**Post date:** [August 29, 2024, 3:56pm UTC](https://forum.weaviate.io/t/weaviate-cloud-serverless-batch-insert-502-server-side-errors-with-v4-client/3909/4 "2024-08-29T15:56:49Z")

</div>

Thank you @Shahin for the fast response. I’ve responded on the support ticket.
