# weaviate.exceptions.WeaviateQueryError: Query call with protocol GRPC search failed with message send POST request: Post "serverurl:11435/api/generate": context deadline exceeded (Client.Timeout exceeded while awaiting headers)

**URL:** <https://forum.weaviate.io/t/weaviate-exceptions-weaviatequeryerror-query-call-with-protocol-grpc-search-failed-with-message-send-post-request-post-serverurl-11435-api-generate-context-deadline-exceeded-client-timeout-exceeded-while-awaiting-headers/3118>\
**Category:** Support\
**Created:** [July 22, 2024, 7:40am UTC](https://forum.weaviate.io/t/weaviate-exceptions-weaviatequeryerror-query-call-with-protocol-grpc-search-failed-with-message-send-post-request-post-serverurl-11435-api-generate-context-deadline-exceeded-client-timeout-exceeded-while-awaiting-headers/3118 "2024-07-22T07:40:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mariam](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/mariam/32/425_2.png) [@Mariam](https://forum.weaviate.io/u/Mariam)\
**Post date:** [July 22, 2024, 7:40am UTC](https://forum.weaviate.io/t/weaviate-exceptions-weaviatequeryerror-query-call-with-protocol-grpc-search-failed-with-message-send-post-request-post-serverurl-11435-api-generate-context-deadline-exceeded-client-timeout-exceeded-while-awaiting-headers/3118/1 "2024-07-22T07:40:07Z")

</div>

### Description

Can you please help me fix this issue? What could be causing it? Is there any configuration I can add to increase the execution time?  
I have created the Weavaite index with Ollama and stored the doc. When I perform a generated search I face this issue.

this command is working  
!curl myserverurl:11434/api/generate -d ‘{“model”: “llama3”,“prompt”:“What is a vector database?”, “stream”: false }’

### Server Setup Information

- Weaviate Server Version: 1.25.4
- Deployment Method: docker
- Multi Node? Number of Running Nodes: 1
- Client Language and Version:python v4
- Multitenancy?: no

### Any additional Information

index schema  
vectorizer\_config=wvc.config.Configure.Vectorizer.text2vec\_ollama(  
api\_endpoint=“myserverurl:11435” ,  
model=“mxbai-embed-large” ),  
generative\_config=wvc.config.Configure.Generative.ollama(  
api\_endpoint=“myserverurl::11435”,  
model=“llama3”  
),  
)  
properties=[wvc.config.Property(  
name=“text”,  
data\_type=wvc.config.DataType.TEXT,  
skip\_vectorization=False,  
vectorize\_property\_name=True,  
tokenization=wvc.config.Tokenization.LOWERCASE

…  
]  
)

---

<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 22, 2024, 9:15pm UTC](https://forum.weaviate.io/t/weaviate-exceptions-weaviatequeryerror-query-call-with-protocol-grpc-search-failed-with-message-send-post-request-post-serverurl-11435-api-generate-context-deadline-exceeded-client-timeout-exceeded-while-awaiting-headers/3118/2 "2024-07-22T21:15:36Z")

</div>

Hi @Mariam!!

Can you post the full stacktrace?

My bet here is that the GRPC port is not exposed properly.

Also, could you share the docker compose you are using?

considering you are mapping the ports in you docker, it should be something like this, considering both the curl and the error message:

```yaml
    ports:
    - 11434:8080
    - 11435:50051

```

so `http` endpoint is mapped to 11434 and `grpc`to 11435

Let me know if that helps!

Thanks!

---

<div class="post-metadata">

**Author:** ![Mariam](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/mariam/32/425_2.png) [@Mariam](https://forum.weaviate.io/u/Mariam)\
**Post date:** [July 24, 2024, 2:21pm UTC](https://forum.weaviate.io/t/weaviate-exceptions-weaviatequeryerror-query-call-with-protocol-grpc-search-failed-with-message-send-post-request-post-serverurl-11435-api-generate-context-deadline-exceeded-client-timeout-exceeded-while-awaiting-headers/3118/3 "2024-07-24T14:21:39Z")

</div>

Hi , @DudaNogueira

I updated my Docker configuration to include the following port mappings:  
ports:  
- 11434:8080  
- 11435:50051

However, I am still encountering the same issue when running the following code:

rresult = client.collections.get(collection\_name)  
response = result.generate.near\_text(  
query=prompt,  
limit=1,  
grouped\_task=f"Answer the question: {prompt}? only using the given context in {{chunk}}"  
)  
print(response.generated)

I suspect the problem might be related to the models I am using. Is that possible? The vectorizer model is ‘mxbai-embed-large’ and the generative model is ‘llama3’.  
@DudaNogueira Thank you for your prompt response and support.

---

<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 24, 2024, 9:05pm UTC](https://forum.weaviate.io/t/weaviate-exceptions-weaviatequeryerror-query-call-with-protocol-grpc-search-failed-with-message-send-post-request-post-serverurl-11435-api-generate-context-deadline-exceeded-client-timeout-exceeded-while-awaiting-headers/3118/4 "2024-07-24T21:05:08Z")

</div>

Hi!

Oh, sorry. I didn’t noticed you are using ollama.

Have you seen this recipe?

> <https://github.com/weaviate/recipes/blob/main/weaviate-features/generative-search/local_rag_using_ollama_integration_using_embedded.ipynb>

It is using ollama, so pretty much the same as you are doing.

If you are using ollama installed on your machine, you will need to change the base url to host.docker.internal: (check the notebook for more info)

So I believe you can leave the ports mapped as:

```auto
    ports:
    - 8080:8080
    - 50051:50051

```

And now, set ollama url to where it is running (again, depending on how you are running ollama)

Let me know if this helps or I can help you.

We just had an office hours today. This is an online event where I answer any questions you bring 🙂

Stay tuned for more here: [Online Workshops & Events | Weaviate - Vector Database](https://weaviate.io/community/events)
