# Vectorizer Timeout settings and behavior

**URL:** <https://forum.weaviate.io/t/vectorizer-timeout-settings-and-behavior/3174>\
**Category:** Support\
**Created:** [July 25, 2024, 7:43pm UTC](https://forum.weaviate.io/t/vectorizer-timeout-settings-and-behavior/3174 "2024-07-25T19:43:40Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ctindel](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/ctindel/32/2009_2.png) [@ctindel](https://forum.weaviate.io/u/ctindel)\
**Post date:** [July 25, 2024, 7:43pm UTC](https://forum.weaviate.io/t/vectorizer-timeout-settings-and-behavior/3174/1 "2024-07-25T19:43:40Z")

</div>

### Description

I am connecting with these timeout settings:

```
client = weaviate.connect_to_local(
    headers=headers,     
    additional_config=AdditionalConfig(
        timeout=Timeout(init=30, query=60, insert=120) # Values in seconds
    )
)

```

I am using the dynamic batch functionality which I specifically thought would rate limit itself to avoid any timeout issues, but I am seeing these types of errors at the end of my batch:

Failed to import object with error: %s "ErrorObject(message=‘WeaviateBatchError(\‘Query call with protocol GRPC batch failed with message \<AioRpcError of RPC that terminated with:\\n\\tstatus = StatusCode.DEADLINE\_EXCEEDED\\n\\tdetails = "Deadline Exceeded"\\n\\tdebug\_error\_string = "UNKNOWN:Error received from peer {created\_time:"2024-07-25T15:35:02.96801-04:00", grpc\_status:4, grpc\_message:"Deadline Exceeded"}"\\n\>.\’)’, object\_=\_BatchObject(collection=‘Product’, vector=None, uuid=‘190f46bd-9a54-5a77-8463-b4845e0e4384’, properties=  
…

I can see that the count of objects doesn’t match the number that went into the batch processor (it’s off by almost half), so I’m guessing there is a timeout going into the vectorizer and so the object fails to insert?

Is there a different timeout I should be setting (infinite?) or some other way I should be throttling or retrying these things?

Do you advise people to infinitely loop over the failed batch objects and retry them until the failed batch array is empty?

---

<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:** [July 25, 2024, 8:26pm UTC](https://forum.weaviate.io/t/vectorizer-timeout-settings-and-behavior/3174/2 "2024-07-25T20:26:51Z")

</div>

hi @ctindel !!

If with the default timeout settings you are seeing timeouts and errors in batch imports, the problem is usually on the resource you have allocated or the network connection between those parties.

This message doesn’t indicate the timeout occurred between Weaviate and the inference model api, but from the client to the server.

Do you have any observability in place for this setup? What are the cpu and memory readings?

Let me know if this helps!

Thanks!

---

<div class="post-metadata">

**Author:** ![ctindel](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/ctindel/32/2009_2.png) [@ctindel](https://forum.weaviate.io/u/ctindel)\
**Post date:** [July 25, 2024, 9:15pm UTC](https://forum.weaviate.io/t/vectorizer-timeout-settings-and-behavior/3174/3 "2024-07-25T21:15:03Z")

</div>

This is all just running directly on my laptop, python on the macos and weaviate inside of docker.

I did set the insert timeout to 120 seconds as you can see, are you saying its taking longer than 120 seconds to insert even though i’m using the throttled dynamic batch functionality?

When I looked at Activity Monitor, between qemu and LM Studio but the CPU and GPU are pretty busy but the system is still very responsive.

I’ve given colima 4 CPUs and 12 GB RAM, not sure if the weaviate process needs more than to handle a single batch insertion thread?

---

<div class="post-metadata">

**Author:** ![ctindel](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/ctindel/32/2009_2.png) [@ctindel](https://forum.weaviate.io/u/ctindel)\
**Post date:** [July 25, 2024, 9:47pm UTC](https://forum.weaviate.io/t/vectorizer-timeout-settings-and-behavior/3174/4 "2024-07-25T21:47:03Z")

</div>

Also are there any examples anywhere of looping over the failed object array and re-inserting them? I am having trouble finding code samples that show how to properly deal with the WeaviateBatchError() object type. Do you just peek into the private object\_ property and replay it from there?

---

<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:** [July 26, 2024, 11:40pm UTC](https://forum.weaviate.io/t/vectorizer-timeout-settings-and-behavior/3174/5 "2024-07-26T23:40:09Z")

</div>

The indexing part is very CPU bound. So maybe it is having a hard time processing both indexing, the vectorization and answering those query/ingestion requests.

On top of the resources you gave to colima, it is interesting to play around with some resource limiting env vars:

> **[Resource Planning | Weaviate - Vector Database](https://weaviate.io/developers/weaviate/concepts/resources#limit-available-resources)**
>
> Weaviate scales well for large projects. Smaller projects, less than 1M objects, do not require resource planning. For medium and large-scale projects, you should plan how to get the best performance from your resources. While you design you system,...

We have some [error handling tips](https://weaviate.io/developers/weaviate/client-libraries/python#error-handling) you can do while importing, but we indeed can improve the docs on advanced batching tips and tricks.

There is a [Spark connector](https://github.com/weaviate/spark-connector), that can be used to create a more robust pipeline and I recall some other tools too.

For example, some time ago, we had this awesome integration between [quix](https://github.com/quixio/quix-streams) and weaviate:

[![](https://canada1.discourse-cdn.com/flex027/uploads/weaviate/original/2X/e/ee309e1f8cb391b0bf29181bee69f91c64ccc704.jpeg "Powering Vector Search with Real-Time Data") ](https://www.youtube.com/watch?v=9pG1pspgELU)

Let me know if this helps!
