# An error occurred: The 'objects' creation was cancelled because it took longer than the configured timeout of 60s. Try reducing the batch size (currently 1) to a lower value. Aim to on average complete batch request within less than 10s

**URL:** <https://forum.weaviate.io/t/an-error-occurred-the-objects-creation-was-cancelled-because-it-took-longer-than-the-configured-timeout-of-60s-try-reducing-the-batch-size-currently-1-to-a-lower-value-aim-to-on-average-complete-batch-request-within-less-than-10s/5423>\
**Category:** Support\
**Tags:** bug\
**Created:** [October 15, 2024, 4:00pm UTC](https://forum.weaviate.io/t/an-error-occurred-the-objects-creation-was-cancelled-because-it-took-longer-than-the-configured-timeout-of-60s-try-reducing-the-batch-size-currently-1-to-a-lower-value-aim-to-on-average-complete-batch-request-within-less-than-10s/5423 "2024-10-15T16:00:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Syed\_Hamza](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/syed_hamza/32/371_2.png) [@Syed\_Hamza](https://forum.weaviate.io/u/Syed_Hamza)\
**Post date:** [October 15, 2024, 4:00pm UTC](https://forum.weaviate.io/t/an-error-occurred-the-objects-creation-was-cancelled-because-it-took-longer-than-the-configured-timeout-of-60s-try-reducing-the-batch-size-currently-1-to-a-lower-value-aim-to-on-average-complete-batch-request-within-less-than-10s/5423/1 "2024-10-15T16:00:04Z")

</div>

### Description

### Server Setup Information

- Weaviate Server Version: 1.21.2
- Deployment Method: docker
- Multi Node? Number of Running Nodes:
- Client Language and Version:
- Multitenancy?:

### Any additional Information

Running into " An error occurred: The ‘objects’ creation was cancelled because it took longer than the configured timeout of 60s. Try reducing the batch size (currently 1) to a lower value. Aim to on average complete batch request within less than 10s " when trying to import data with batch size one using following snippet

```auto

    @staticmethod
    def import_data_to_weaviate(client, vectorDB, properties, emb1, emb2, embedding_to_insert):
        """
        Imports data into Weaviate by adding objects with embeddings.
        """
        client.batch.configure(batch_size=1) # Configure batch
        with client.batch as batch:
            try:
                # Generate a unique identifier based on the embeddings
                uuid = weaviate.util.generate_uuid5(emb1.tobytes() + emb2.tobytes())
                batch.add_data_object(properties, vectorDB, uuid=uuid, vector=np.array(embedding_to_insert))
                
            except Exception as e:
                print(f"An error occurred: {e}")

```

The error seems to occur randomly at times.

---

<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:** [October 15, 2024, 4:05pm UTC](https://forum.weaviate.io/t/an-error-occurred-the-objects-creation-was-cancelled-because-it-took-longer-than-the-configured-timeout-of-60s-try-reducing-the-batch-size-currently-1-to-a-lower-value-aim-to-on-average-complete-batch-request-within-less-than-10s/5423/2 "2024-10-15T16:05:22Z")

</div>

hi @Syed_Hamza !!

Welcome to our community 🤗

Version 1.21 is really old, I would strongly suggest you to migrate it.

Considering the version, you are probably using the python v3 version.

How are you vectorizing that object?

We strongly suggest you to move to a newer version and leverage the new python v4 client with GRPC. Not only it is more performant, but also easier to debug.

It would be interesting to check this documentation on how to do error handling with python v3 client:

> **[Legacy (v3) API (DEPRECATED) | Weaviate](https://weaviate.io/developers/weaviate/client-libraries/python/python_v3#error-handling)**
>
> This document relates to the legacy v3 client and API.

Let me know if that helps!
