# Client.Timeout exceeded while awaiting headers - During insertion data in weaviate

**URL:** <https://forum.weaviate.io/t/client-timeout-exceeded-while-awaiting-headers-during-insertion-data-in-weaviate/9871>\
**Category:** Support\
**Created:** [January 23, 2025, 4:41pm UTC](https://forum.weaviate.io/t/client-timeout-exceeded-while-awaiting-headers-during-insertion-data-in-weaviate/9871 "2025-01-23T16:41:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Muhammad\_Ashir](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/muhammad_ashir/32/2644_2.png) [@Muhammad\_Ashir](https://forum.weaviate.io/u/Muhammad_Ashir)\
**Post date:** [January 23, 2025, 4:41pm UTC](https://forum.weaviate.io/t/client-timeout-exceeded-while-awaiting-headers-during-insertion-data-in-weaviate/9871/1 "2025-01-23T16:41:12Z")

</div>

Here is my code

```auto
client = weaviate.connect_to_local(
    host="localhost", # Use a string to specify the host
    port=8080,
    grpc_port=50051,
    additional_config=AdditionalConfig(
        timeout=Timeout(init=600, query=500, insert=1000) # Values in seconds
    )
)

        with collection.batch.rate_limit(requests_per_minute=10) as batch:
            batch.add_object(properties=data_row)

        if len(collection.batch.failed_objects) > 0:
            print(collection.batch.failed_objects)
           

```

its giving me error related to timeout even though I have increased the timeout as well in above connection thing here is the error I am facing I have content of almost 10K words.

[ErrorObject(message=‘WeaviateInsertManyAllFailedError('Every object failed during insertion. Here is the set of all errors: send POST request: Post “[http://t2v-transformers:8080/vectors](http://t2v-transformers:8080/vectors)”: context deadline exceeded (Client.Timeout exceeded while awaiting headers)')’, object\_=\_BatchObject(collection=‘Collection\_83cdb7b2569a428095e38b73e8348168’, vector=None, uuid=‘f42b6ee8-f256-4bd3-9f6a-c53ec77fe27d’,

I have tired dynamic import as well.

---

<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:** [January 23, 2025, 7:55pm UTC](https://forum.weaviate.io/t/client-timeout-exceeded-while-awaiting-headers-during-insertion-data-in-weaviate/9871/2 "2025-01-23T19:55:18Z")

</div>

hi @Muhammad_Ashir !!

The issue here seems to be the time out from Weaviate server to your embedding service at [http://t2v-transformers:8080/vectors](http://t2v-transformers:8080/vectors).

So changing the timeout on client will take no effect and the fact that it is timeouting is because you are away from an acceptable threshold 😬

We have two options from here:

1. Increase the resource of your embedding service, making sure you get it is below to what Weaviate understands as acceptable.

2. Increase the module client timeout (default as I write 50s), allowing Weaviate to wait for this vectorization for more time by [setting a different MODULES\_CLIENT\_TIMEOUT as documented here](https://weaviate.io/developers/weaviate/config-refs/env-vars).

Let me know if that helps!

Thanks!
