# Write Timeout for Batch Vectorization in Docker – TLS & Container Restart Issues

**URL:** https://forum.weaviate.io/t/write-timeout-for-batch-vectorization-in-docker-tls-container-restart-issues/10737
**Category:** Support
**Tags:** technical, integration
**Created:** [March 4, 2025, 2:38pm UTC](https://forum.weaviate.io/t/write-timeout-for-batch-vectorization-in-docker-tls-container-restart-issues/10737 "2025-03-04T14:38:20Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Volvo](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/volvo/32/3775_2.png) [@Volvo](https://forum.weaviate.io/u/Volvo)
#### Post date: [March 4, 2025, 2:38pm UTC](https://forum.weaviate.io/t/write-timeout-for-batch-vectorization-in-docker-tls-container-restart-issues/10737/1 "2025-03-04T14:38:20Z")

</div>

I’m building a chatbot that uses Weaviate and t2v-transformers for vectorizing my knowledge base. My way of sends batches like this:

`var batchResponse = await _httpClient.PostAsync($"{_weaviateUrl}/v1/batch/objects", batchContent);`

Each batch contains 50 objects, runs with 5 parallel processes, and each object includes about 12 sentences. Most batches succeed, but occasionally I run into this error:

> t2v-transformers-1 | INFO: 172.21.0.4:55808 - “POST /vectors HTTP/1.1” 200 OK  
> weaviate-1 | {“build\_git\_commit”:“584532a”, … “error”:“write tcp 172.21.0.4:8080-\>172.21.0.1:33884: i/o timeout”, “hint”:“Either try increasing the server-side timeout using e.g. ‘–write-timeout=600s’ …”}

The error suggests increasing the server-side timeout using `--write-timeout=600s`. When I added that to my Weaviate Docker configuration, the container started to reload repeatedly with errors about missing TLS certificates. To resolve the TLS issue, I generated certificates with OpenSSL, mapped them into the container, and configured Weaviate to use them.

Here’s my current Docker Compose configuration for Weaviate and t2v-transformers:

```auto
weaviate:
  image: cr.weaviate.io/semitechnologies/weaviate:1.26.4
  restart: unless-stopped
  ports:
    - 8080:8080
    - 50051:50051
  volumes:
    - /var/beyond_weaviate_data:/data
    - ./certs:/certs 
  command: [
      "/app/weaviate",
      "--write-timeout=600s",
      "--tls-certificate=/certs/cert.pem", 
      "--tls-key=/certs/key.pem"          
    ]
  environment:
    QUERY_DEFAULTS_LIMIT: 100
    AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED: 'true'
    PERSISTENCE_DATA_PATH: "/data"
    DEFAULT_VECTORIZER_MODULE: text2vec-transformers
    ENABLE_MODULES: text2vec-transformers
    TRANSFORMERS_INFERENCE_API: http://t2v-transformers:8080
    CLUSTER_HOSTNAME: 'node1'
    BATCH_TIMEOUT: 300

t2v-transformers:
  image: cr.weaviate.io/semitechnologies/transformers-inference:sentence-transformers-multi-qa-MiniLM-L6-cos-v1
  restart: unless-stopped
  environment:
    ENABLE_CUDA: 0
    USE_SENTENCE_TRANSFORMERS_MULTI_PROCESS: "true"
    ENABLE_CACHE: "true"

```

After adding the certificate parameters, the container stopped reloading, but now my application cannot connect. I get connection errors in my .NET client similar to:

```auto
at System.Net.Http.HttpConnection.<SendAsync>d__57.MoveNext()
...
at NLP_LLMEngine.Services.WeaviateVectorizationService.<CreateCollectionIfNotExistsAsync>d__11.MoveNext() in ...\WeaviateVectorizationService.cs:line 70

```

Weaviate logs show that the transformer remote inference service is not ready (connection refused on `t2v-transformers:8080`). And thats how i get connectivity issues and timeout errors.

## My Question

How can I safely add a server-side write timeout (e.g., `--write-timeout=600s`) for batch vectorization without causing TLS certificate issues or container restarts? And if the tls is needed in my case is there a way to configure Weaviate to use the specified TLS certificate and key without interfering with communication between Weaviate and t2v-transformers?

Any help to handle these issues would be greatly appreciated. I’m fairly new to vector databases and Weaviate, so any help would be great, thanks in advance.

---

<div class="post-metadata">

### Author: ![Shahin](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/shahin/32/7944_2.png) [@Shahin](https://forum.weaviate.io/u/Shahin)
#### Post date: [March 5, 2025, 9:11am UTC](https://forum.weaviate.io/t/write-timeout-for-batch-vectorization-in-docker-tls-container-restart-issues/10737/2 "2025-03-05T09:11:21Z")

</div>

Hey @Volvo

It’s great to have you in our community!

Have you tried to reduce the parallel processes to 1 or 2, or limit it to 100 objects at a time. It’s also worth checking that your network latency is good.

I’d also suggest ensuring the resources are sufficient in your cluster. Also, try increasing the connection timeout for Weaviate, especially for inserts:

> additional\_config=AdditionalConfig(  
> timeout=Timeout(init=30, query=240, insert=240),  
> )

> **[Local instances | Weaviate Documentation](https://docs.weaviate.io/weaviate/connections/connect-local)**
>
> Follow these steps to connect to a locally hosted Weaviate instance.

Regarding TLS configuration, please see the following example from my colleague @DudaNogueira regarding SSL/TLS

> [@Does Weaviate support SSL out of the box?](https://forum.weaviate.io/t/does-weaviate-support-ssl-out-of-the-box/620/6):
>
> hi @lakshminarayana ! Welcome to our community. Our documentation usually doesn’t cover the SSL/TLS side of the deployment for two main reasons: 1 - Usually, self deployments will not expose Weaviate directly. Their applications will be exposed. but not Weaviate. 2 - Whenever there is a reason to expose Weaviate under a SSL/TLS connection, one can use a variety of reverse proxies, load balancers and so on. I have crafted here a gist on how to deploy Weaviate, with a single node, using docker…

Regards,  
Mohamed Shahin  
Support Engineer

---

<div class="post-metadata">

### Author: ![Volvo](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/volvo/32/3775_2.png) [@Volvo](https://forum.weaviate.io/u/Volvo)
#### Post date: [March 5, 2025, 9:38am UTC](https://forum.weaviate.io/t/write-timeout-for-batch-vectorization-in-docker-tls-container-restart-issues/10737/3 "2025-03-05T09:38:36Z")

</div>

Hi @Shahin ,thanks for replying!

I have tried reducing parallelism to **2** and increasing the batch size from **50 to 100** , like so:

```json
"WeaviateSettings": {
  "Host": "127.0.0.1",
  "Port": 8080,
  "GrpcPort": 50051,
  "BatchChunkSize": 100,
  "MaxParallelBatches": 2,
  "SentencesPerObject": 12
}

```

However, I am still facing the **same issue** with this error in my Weaviate console:

```log
weaviate-1 | {"build_git_commit":"584532a","build_go_version":"go1.21.13","build_image_tag":"1.26.4","build_wv_version":"1.26.4","description":"An I/O timeout occurs when the request takes longer than the specified server-side timeout.","error":"write tcp 172.21.0.5:8080-\u003e172.21.0.1:35834: i/o timeout","hint":"Either try increasing the server-side timeout using e.g. '--write-timeout=600s' as a command line flag when starting Weaviate, or try sending a computationally cheaper request, for example by reducing a batch size, reducing a limit, using less complex filters, etc. Note that this error is only thrown if client-side and server-side timeouts are not in sync, more precisely if the client-side timeout is longer than the server side timeout.","level":"error","method":"POST","msg":"i/o timeout","path":{"Scheme":"","Opaque":"","User":null,"Host":"","Path":"/v1/batch/objects","RawPath":"","OmitHost":false,"ForceQuery":false,"RawQuery":"","Fragment":"","RawFragment":""},"time":"2025-03-05T09:29:35Z"}

```

### My Setup:

I am using **.NET** and hosting Weaviate locally on Docker with the following configuration:

```yaml
weaviate:
  image: cr.weaviate.io/semitechnologies/weaviate:1.26.4
  restart: unless-stopped
  ports:
    - 8080:8080
    - 50051:50051
  volumes:
      - /var/beyond_weaviate_data:/data
  environment:
    QUERY_DEFAULTS_LIMIT: 100
    AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED: 'true'
    PERSISTENCE_DATA_PATH: "/data"
    DEFAULT_VECTORIZER_MODULE: text2vec-transformers
    ENABLE_MODULES: text2vec-transformers
    TRANSFORMERS_INFERENCE_API: http://t2v-transformers:8080
    CLUSTER_HOSTNAME: 'node1'
    BATCH_TIMEOUT: 300

t2v-transformers:
  image: cr.weaviate.io/semitechnologies/transformers-inference:sentence-transformers-multi-qa-MiniLM-L6-cos-v1
  restart: unless-stopped
  environment:
    ENABLE_CUDA: 0  
    USE_SENTENCE_TRANSFORMERS_MULTI_PROCESS: "true"
    ENABLE_CACHE: "true"

```

### What I Tried:

I have attempted to add `--write-timeout=600s` to my Docker setup. However, after doing so, I am facing another issue: **Weaviate keeps reloading.**

The error I receive is:

```log
weaviate-1 | {"action":"restapi_management","build_git_commit":"584532a","build_go_version":"go1.21.13","build_image_tag":"1.26.4","build_wv_version":"1.26.4","docker_image_tag":"1.26.4","level":"info","msg":"the required flags `--tls-certificate` and `--tls-key` were not specified","time":"2025-03-05T09:34:07Z"}
weaviate-1 exited with code 0

```

I’d appreciate any guidance on resolving this issue, because I’m unsure of what am I doing wrong and how should my docker look like

---

<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: [March 13, 2025, 3:11pm UTC](https://forum.weaviate.io/t/write-timeout-for-batch-vectorization-in-docker-tls-container-restart-issues/10737/4 "2025-03-13T15:11:10Z")

</div>

Hi!

Can you try increasing the value of MODULES\_CLIENT\_TIMEOUT?

You can get more info on this here:

> **[Environment variables | Weaviate](https://weaviate.io/developers/weaviate/config-refs/env-vars)**
>
> To configure Weaviate in a Docker or a Kubernetes deployment, set these environment variables
