# Timeout values in Wevaiate config

**URL:** <https://forum.weaviate.io/t/timeout-values-in-wevaiate-config/3006>\
**Category:** General\
**Tags:** python, documentation\
**Created:** [July 10, 2024, 4:13pm UTC](https://forum.weaviate.io/t/timeout-values-in-wevaiate-config/3006 "2024-07-10T16:13:14Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![adithya.ch](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/adithya.ch/32/615_2.png) [@adithya.ch](https://forum.weaviate.io/u/adithya.ch)\
**Post date:** [July 10, 2024, 4:13pm UTC](https://forum.weaviate.io/t/timeout-values-in-wevaiate-config/3006/1 "2024-07-10T16:13:14Z")

</div>

Hi Team,

We are using Python v4 client and weaviate 1.25.3 version deployed on kubernetes cluster.

Following values are set in the values.yaml

**- --read-timeout=600s \*\*  
\*\* - --write-timeout=600s**

Still my generate queries fail with timeout errors after 30 seconds ?

**gen\_results = tnt\_coll.generate.near\_text(**  
\*\* query=“What is the payload for create ?”,\*\*  
\*\* grouped\_task=“Answer the question: What is the payload for create ?”\*\*  
**)**

WeaviateQueryError: Query call with protocol GRPC search failed with message Deadline Exceeded

Tried setting the timeout values in client conn config as well.

**client = weaviate.WeaviateClient(**  
\*\* connection\_params=ConnectionParams.from\_params(\*\*  
\*\* http\_host=“host1”,\*\*  
\*\* http\_port=2730,\*\*  
\*\* http\_secure=True,\*\*  
\*\* grpc\_host=“host1”,\*\*  
\*\* grpc\_port=2731,\*\*  
\*\* grpc\_secure=True\*\*  
\*\* ),\*\*  
\*\* additional\_config=AdditionalConfig(\*\*  
\*\* timeout=Timeout(query=10) # Values in seconds\*\*  
\*\* ),\*\*  
\*\* auth\_client\_secret=weaviate.auth.AuthApiKey("\*\***")  
\*\* )**

Still the issue exists ?

Also would like to understand more on the memory consumption details. Is there any metrics i can enable in prometheus / grafana to monitor the memory usage ?

Regards,  
Adithya

---

<div class="post-metadata">

**Author:** ![adithya.ch](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/adithya.ch/32/615_2.png) [@adithya.ch](https://forum.weaviate.io/u/adithya.ch)\
**Post date:** [July 10, 2024, 6:45pm UTC](https://forum.weaviate.io/t/timeout-values-in-wevaiate-config/3006/2 "2024-07-10T18:45:12Z")

</div>

@DudaNogueira Can you please help on this issue ?

Regards,  
Adithya

---

<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 11, 2024, 8:24pm UTC](https://forum.weaviate.io/t/timeout-values-in-wevaiate-config/3006/3 "2024-07-11T20:24:10Z")

</div>

hi @adithya.ch !!

Do you see any outstanding logs on Weaviate side?

Memory should be monitored directly from the host, AFAIK.

---

<div class="post-metadata">

**Author:** ![adithya.ch](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/adithya.ch/32/615_2.png) [@adithya.ch](https://forum.weaviate.io/u/adithya.ch)\
**Post date:** [July 11, 2024, 8:37pm UTC](https://forum.weaviate.io/t/timeout-values-in-wevaiate-config/3006/4 "2024-07-11T20:37:19Z")

</div>

![image](https://canada1.discourse-cdn.com/flex027/uploads/weaviate/original/2X/5/544c7ccdc8091d979a92241de37e2f5faeefd44a.jpeg)

Above is the error i see after crossing 30 seconds. It always timesout after 30 seconds. If the query completes within 30 seconds it work fine.

Logs show below details no errors as such

```auto
time="2024-07-11T20:32:03Z" level=debug msg=" memberlist: Initiating push/pull sync with: weaviate-2"
time="2024-07-11T20:32:12Z" level=debug msg="observed node wide metrics" action=observe_node_wide_metrics object_count=85 took="75.166µs"
time="2024-07-11T20:32:12Z" level=debug msg="observed tenant activity stats" action=observe_tenantactivity took="8.209µs"
time="2024-07-11T20:32:22Z" level=debug msg="observed tenant activity stats" action=observe_tenantactivity took="11.514µs"
time="2024-07-11T20:32:26Z" level=debug msg=" memberlist: Stream connection"
time="2024-07-11T20:32:32Z" level=debug msg="observed tenant activity stats" action=observe_tenantactivity took="20.779µs"
time="2024-07-11T20:32:33Z" level=debug msg=" memberlist: Initiating push/pull sync with: weaviate-2"
time="2024-07-11T20:32:42Z" level=debug msg="observed node wide metrics" action=observe_node_wide_metrics object_count=85 took="71.498µs"
time="2024-07-11T20:32:42Z" level=debug msg="observed tenant activity stats" action=observe_tenantactivity took="7.704µs"
time="2024-07-11T20:32:52Z" level=debug msg="observed tenant activity stats" action=observe_tenantactivity took="20.091µs"
time="2024-07-11T20:33:02Z" level=debug msg="observed tenant activity stats" action=observe_tenantactivity took="20.64µs"
time="2024-07-11T20:33:03Z" level=debug msg=" memberlist: Initiating push/pull sync with: weaviate-2"
time="2024-07-11T20:33:12Z" level=debug msg="observed node wide metrics" action=observe_node_wide_metrics object_count=85 took="79.493µs"
time="2024-07-11T20:33:12Z" level=debug msg="observed tenant activity stats" action=observe_tenantactivity took="8.692µs"
time="2024-07-11T20:33:16Z" level=debug msg=" memberlist: Stream connection"
time="2024-07-11T20:33:22Z" level=debug msg="observed tenant activity stats" action=observe_tenantactivity took="38.098µs"
time="2024-07-11T20:33:32Z" level=debug msg="observed tenant activity stats" action=observe_tenantactivity took="23.066µs"
time="2024-07-11T20:33:33Z" level=debug msg=" memberlist: Initiating push/pull sync with: weaviate-2"
time="2024-07-11T20:33:42Z" level=debug msg="observed node wide metrics" action=observe_node_wide_metrics object_count=85 took="101.806µs"
time="2024-07-11T20:33:42Z" level=debug msg="observed tenant activity stats" action=observe_tenantactivity took="7.886µs"
time="2024-07-11T20:33:52Z" level=debug msg="observed tenant activity stats" action=observe_tenantactivity took="22.663µs

```

---

<div class="post-metadata">

**Author:** ![adithya.ch](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/adithya.ch/32/615_2.png) [@adithya.ch](https://forum.weaviate.io/u/adithya.ch)\
**Post date:** [July 12, 2024, 4:21pm UTC](https://forum.weaviate.io/t/timeout-values-in-wevaiate-config/3006/5 "2024-07-12T16:21:21Z")

</div>

Hi @DudaNogueira

Any suggestions to fix the issue ? It’s a blocker for our applications running on weaviate deployments !

Regards,  
Adithya

---

<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 15, 2024, 6:56pm UTC](https://forum.weaviate.io/t/timeout-values-in-wevaiate-config/3006/6 "2024-07-15T18:56:26Z")

</div>

Ok, this can mitigate, but a query shouldn’t take that long:

> **[Python | Weaviate - Vector Database](https://weaviate.io/developers/weaviate/client-libraries/python#timeout-values)**
>
> Overview

there are more timeout configs:

```auto
client = weaviate.connect_to_local(
    port=8080,
    grpc_port=50051,
    additional_config=AdditionalConfig(
        timeout=Timeout(init=30, query=60, insert=120) # Values in seconds
    )
)

```

But it would be interesting to understand why it is taking that long 🤔

---

<div class="post-metadata">

**Author:** ![adithya.ch](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/adithya.ch/32/615_2.png) [@adithya.ch](https://forum.weaviate.io/u/adithya.ch)\
**Post date:** [July 15, 2024, 10:50pm UTC](https://forum.weaviate.io/t/timeout-values-in-wevaiate-config/3006/7 "2024-07-15T22:50:22Z")

</div>

Hi @DudaNogueira

Tried setting the query values to 600, still the query was timing out in 30 seconds.

Tried uninstalling weaviate client and installing it again and it works fine now ! Looks like some bug with weaviate client / Python which was installed earlier !

Regards,  
Adithya

---

<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 16, 2024, 1:53pm UTC](https://forum.weaviate.io/t/timeout-values-in-wevaiate-config/3006/8 "2024-07-16T13:53:44Z")

</div>

hi @adithya.ch !

What is the version you are running?  
Do you still see this error on latest version?  
How many objects do your have indexed?  
is it multi tenant?

It’s good to get more readings from your cluster. Check this doc on observability:

> **[Monitoring | Weaviate - Vector Database](https://weaviate.io/developers/weaviate/configuration/monitoring)**
>
> Weaviate can expose Prometheus-compatible metrics for monitoring. A standard

Let me know if this helps.

---

<div class="post-metadata">

**Author:** ![andreasDroid](https://avatars.discourse-cdn.com/v4/letter/a/f0a364/32.png) [@andreasDroid](https://forum.weaviate.io/u/andreasDroid)\
**Post date:** [July 17, 2024, 2:01pm UTC](https://forum.weaviate.io/t/timeout-values-in-wevaiate-config/3006/9 "2024-07-17T14:01:05Z")

</div>

Hi @DudaNogueira ,

I would like to also report that we experience timeout issues with the JS/TS v3 client. Specifically it does not seem that neither the .connectToLocal or the .connectToCustom respect the input timeout values.

We’re running a bit more complex nearText task, which on rare occasions will run longer than 30 seconds.

We’ve tried setting the timeout values very low in order to trigger an earlier exit from the request, but the client remains connection on queries up until the 30 sec mark.

```auto
        const timeoutParams: TimeoutParams = {
            query: 60,
            init: 30
        }
        const connectionProps: ConnectToCustomOptions = {
                httpHost: process.env.WEAVIATE_HOST, // URL only, no http prefix
                httpPort: 8080,
                grpcHost: process.env.WEAVIATE_HOST,
                grpcPort: 50051,
                timeout: timeoutParams // Values in seconds
        }
        const client: WeaviateClient = await weaviate.connectToCustom(
            connectionProps
           )

```

It’s the same song for both connectToLocal and connectToCustom. Always, the message is “Query call with protocol gRPC failed with message : The operation has been aborted”. There are no additional logs in debug mode on the weaviate side, other than at request reception:

```auto
2024-07-17 15:55:20 {"action":"restapi_request","level":"debug","method":"GET","msg":"received HTTP request","time":"2024-07-17T13:55:20Z","url":{"Scheme":"","Opaque":"","User":null,"Host":"","Path":"/v1/meta","RawPath":"","OmitHost":false,"ForceQuery":false,"RawQuery":"","Fragment":"","RawFragment":""}}

```

Weaviate instance is running locally with image: weaviate:1.25.4 image  
Weaviate client version is “weaviate-client”: “^3.0.9”

Otherwise, Weaviate is working beautifully, thank you 👌

Regards,  
Andreas

---

<div class="post-metadata">

**Author:** ![andreasDroid](https://avatars.discourse-cdn.com/v4/letter/a/f0a364/32.png) [@andreasDroid](https://forum.weaviate.io/u/andreasDroid)\
**Post date:** [July 19, 2024, 2:51pm UTC](https://forum.weaviate.io/t/timeout-values-in-wevaiate-config/3006/10 "2024-07-19T14:51:02Z")

</div>

Hi @DudaNogueira ,  
I was wondering if you had time looking in to our issue. Would you rather that we create a new issue?

---

<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 19, 2024, 4:09pm UTC](https://forum.weaviate.io/t/timeout-values-in-wevaiate-config/3006/11 "2024-07-19T16:09:06Z")

</div>

hi @andreasDroid !!

For those parameters, it will try to init (check GRPC health, for example) for up to 30 seconds, and a query for up to 60 seconds.

connectoToLocal or ConnectoToCustom or any `connect` are basically “the same”. Under the hood it will fill the corresponding informations for you.

But before that, 30 seconds is a lot for a query 🤔

I have asked internally about how to actually test the timeout. The code you posted should indeed only raise the query timeout at 60s

---

<div class="post-metadata">

**Author:** ![andreasDroid](https://avatars.discourse-cdn.com/v4/letter/a/f0a364/32.png) [@andreasDroid](https://forum.weaviate.io/u/andreasDroid)\
**Post date:** [July 22, 2024, 8:47am UTC](https://forum.weaviate.io/t/timeout-values-in-wevaiate-config/3006/12 "2024-07-22T08:47:35Z")

</div>

Thank you.  
Yeah. We’ve been trying to trigger an earlier exit by setting the query timeout to 1 sec - hoping to see an effect. However, that does not change the query behaviour since it runs up until the default 30 seconds. So we’re wondering how we can change the timeout parameter.

I agree, 30 sec is indeed a lot for the query. We’re using a big prompt with open ai module, and at times we have to accept the long duration since streaming response in weaviate is not available.

Alternatively, we could fetch the sources with weaviate and use azure/open ai client for completion.
