# Getting timeout error on the batch insertion of the data

**URL:** <https://forum.weaviate.io/t/getting-timeout-error-on-the-batch-insertion-of-the-data/9247>\
**Category:** Support\
**Tags:** technical\
**Created:** [December 16, 2024, 7:13am UTC](https://forum.weaviate.io/t/getting-timeout-error-on-the-batch-insertion-of-the-data/9247 "2024-12-16T07:13:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yogesh\_Chauhan](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/yogesh_chauhan/32/3170_2.png) [@Yogesh\_Chauhan](https://forum.weaviate.io/u/Yogesh_Chauhan)\
**Post date:** [December 16, 2024, 7:13am UTC](https://forum.weaviate.io/t/getting-timeout-error-on-the-batch-insertion-of-the-data/9247/1 "2024-12-16T07:13:05Z")

</div>

```auto
client = weaviate.connect_to_local(host=WEAVIATE_HOST, port=WEAVIATE_PORT,
                                       grpc_port=WEAVIATE_SECOND_PORT, headers=w_headers,
                                       auth_credentials=weaviate_auth_credentials,
                                       skip_init_checks=True,
                                       additional_config=AdditionalConfig(
                                           connection=ConnectionConfig(
                                               session_pool_connections=30,
                                               session_pool_maxsize=200,
                                               session_pool_max_retries=3,
                                           ),
                                           timeout = (60, 180)
                                           ,)
                                       )

weaviate_class_name = email_to_weaviate_class_name(email)
        if is_collection_available(weaviate_client=client, collection_name=weaviate_class_name):

collection = client.collections.get(weaviate_class_name)
print(f"started updating {email}")
for item in collection.iterator():
    properties = item.properties
    properties["data_origin"] = "native_data"
    collection.data.update(uuid=item.uuid, properties=properties)
    print("data updated")

```

---

<div class="post-metadata">

**Author:** ![DudaNogueira](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/dudanogueira/32/7846_2.png) [@DudaNogueira](https://forum.weaviate.io/u/DudaNogueira)\
**Post date:** [December 16, 2024, 1:24pm UTC](https://forum.weaviate.io/t/getting-timeout-error-on-the-batch-insertion-of-the-data/9247/2 "2024-12-16T13:24:34Z")

</div>

Hi @Yogesh_Chauhan !!

Welcome to our community 🤗

This operation can be very costly, depending on your dataset, and it can be putting the cluster under stress.

It not only update the property, but (if properly configured) trigger a re vectorization of you object, and reindex this object with the new content.

If all your properties have changed, it is best to reindex the entire collection using batch instead of updating it one by one.

Or, if you know the object ids that you need to update beforehand, you can leverage the [batch process](https://weaviate.io/developers/weaviate/manage-data/import), and make sure to pass the same ID, like documented here on using [deterministic ids](https://weaviate.io/developers/weaviate/manage-data/create#generate-deterministic-ids).

Let me know if those can be solutions for your.

Thanks!
