# Elser service can't index large amount of data

**URL:** <https://discuss.elastic.co/t/elser-service-cant-index-large-amount-of-data/368527>\
**Category:** Elastic Search\
**Created:** [October 9, 2024, 1:08pm UTC](https://discuss.elastic.co/t/elser-service-cant-index-large-amount-of-data/368527 "2024-10-09T13:08:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![overflowalligator](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/overflowalligator/32/138000_2.png) [@overflowalligator](https://discuss.elastic.co/u/overflowalligator)\
**Post date:** [October 9, 2024, 1:08pm UTC](https://discuss.elastic.co/t/elser-service-cant-index-large-amount-of-data/368527/1 "2024-10-09T13:08:56Z")

</div>

I am creating an index with semantic serach using the semantic\_text field type and following this tutorial [here](https://www.elastic.co/guide/en/elasticsearch/reference/current/semantic-search-semantic-text.html).

I've created the inference endpoint deployment with the following configurations:

```auto
{
  "inference_id": "my-elser-endpoint-v1",
  "task_type": "sparse_embedding",
  "service": "elser",
  "service_settings": {
    "num_allocations": 9,
    "num_threads": 4,
    "model_id": ".elser_model_2_linux-x86_64"
  },
  "task_settings": {}
}

```

My goal is to index 5 million records into my new index that supports semantic search. However, I am continuously recieving the following error either from bulk insert or from issuing the reindex command.

```auto
inference process queue is full. Unable to execute command

```

From what I can tell, one solution may be to increase the [queue\_capacity](https://www.elastic.co/guide/en/elasticsearch/reference/current/start-trained-model-deployment.html#start-trained-model-deployment-query-params) of the deployed model. Since I'm using the elser service, it seems that that configuration is abstracted from me. Is there any to set this config on the service or do I need to use a custom [deployed model](https://www.elastic.co/guide/en/elasticsearch/reference/current/semantic-search-deployed-nlp-model.html) to achieve this level of configuration?

---

<div class="post-metadata">

**Author:** ![ashishtiwari1993](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ashishtiwari1993/32/135241_2.png) [@ashishtiwari1993](https://discuss.elastic.co/u/ashishtiwari1993)\
**Post date:** [October 10, 2024, 8:01am UTC](https://discuss.elastic.co/t/elser-service-cant-index-large-amount-of-data/368527/3 "2024-10-10T08:01:14Z")

</div>

Hi @overflowalligator, Welcome to the Elastic community -

1. Indeed increasing `queue_capacity` is one of the solution. You can hit [API](https://www.elastic.co/guide/en/elasticsearch/reference/current/start-trained-model-deployment.html#start-trained-model-deployment-example) to start a deployment with specific value.
2. The default queue capacity is `1024`. So you can send first batch of 1024 and wait for completion before sending next batch.
3. To meet your numbers, may be you can scale vertically (or add more machine learning nodes) and tune `number_of_allocations ` & `threads_per_allocation` accordingly.

---

<div class="post-metadata">

**Author:** ![overflowalligator](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/overflowalligator/32/138000_2.png) [@overflowalligator](https://discuss.elastic.co/u/overflowalligator)\
**Post date:** [October 10, 2024, 2:23pm UTC](https://discuss.elastic.co/t/elser-service-cant-index-large-amount-of-data/368527/4 "2024-10-10T14:23:49Z")

</div>

Hi [ashishtiwari1993](https://discuss.elastic.co/u/ashishtiwari1993), thank you for your response. Ideally I would like to increase the queue capacity of my inference endpoint. However, I do not see how I can do this when using the `semantic_text` feature and `elser` service.

Below is the exact API request I am using for this and I cannot find a property to set the queue capacity on the endpoint.

```auto
PUT _inference/sparse_embedding/my-elser-endpoint-v1
{
  "service": "elser", 
  "service_settings": {
    "num_allocations": 9,
    "num_threads": 4
  }
}

```

Could you please confirm that it is possible to change the `queue_capacity` on an inference endpoint that uses the `elser` service?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [November 7, 2024, 2:24pm UTC](https://discuss.elastic.co/t/elser-service-cant-index-large-amount-of-data/368527/5 "2024-11-07T14:24:39Z")

</div>

Closed on November 7, 2024, 2:24pm UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
