# App Search Rate limiting search requests?

**URL:** <https://discuss.elastic.co/t/app-search-rate-limiting-search-requests/357518>\
**Category:** Elastic Search\
**Tags:** elastic-app-search\
**Created:** [April 16, 2024, 1:01pm UTC](https://discuss.elastic.co/t/app-search-rate-limiting-search-requests/357518 "2024-04-16T13:01:12Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chenko](https://avatars.discourse-cdn.com/v4/letter/c/258eb7/32.png) [@Chenko](https://discuss.elastic.co/u/Chenko)\
**Post date:** [April 16, 2024, 1:01pm UTC](https://discuss.elastic.co/t/app-search-rate-limiting-search-requests/357518/1 "2024-04-16T13:01:12Z")

</div>

Hi,

I currently have a cloud instance of elastic and an application, the application sends a lot of search request to App Search, around 2-5/s however some of these search requests return an empty body\*, if I then wait for a bit and resend the exact same request I get a perfect result set.

With empty body I mean:

```auto
{
  "meta": {
    "alerts": [],
    "warnings": [],
    "precision": 8,
    "engine": {
      "name": "engine-name-qa",
      "type": "default"
    },
    "page": {
      "current": 1,
      "total_pages": 0,
      "total_results": 0,
      "size": 10
    },
    "request_id": "1234"
  },
  "results": []
}

```

> Note: No alerts or warnings!

I was thinking this was because of rate limiting however I am using a Private key so I would think app search would take that into account and not rate limit requests with a private key?

Another reason I was thinking of would be because we do not have enough resources? (I am starting to think it is because of ES resources however still weird that app search just returns an empty search response instead of telling me something is wrong.)

This QA deployment has the following resources:  
ES 1 zone, 1GB ram, 8vCPU's  
KIB 1 zone, 1GB ram, 8vCPU's  
ENT Search, 1 zone 2GB ram & 8 vCPU's

Any help would be appreciated.

---

<div class="post-metadata">

**Author:** ![Sean\_Story](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sean_story/32/69987_2.png) [@Sean\_Story](https://discuss.elastic.co/u/Sean_Story)\
**Post date:** [April 16, 2024, 1:23pm UTC](https://discuss.elastic.co/t/app-search-rate-limiting-search-requests/357518/2 "2024-04-16T13:23:40Z")

</div>

Hi @Chenko ,

App Search does not have some rate limiting behaviors. You can read about the limits it does have here: [Limits | App Search documentation [8.13] | Elastic](https://www.elastic.co/guide/en/app-search/current/limits.html#limits)

When App Search does encounter a limit, or under the hood Elasticsearch hits a limit, you won't receive an empty result set, but an error response.

I can think of two things that might be causing the behavior you're seeing:

1. Your Elasticsearch is unhealthy, and having shard errors. This means that depending on which node services the App Search request, you're getting different/no results. Check your Elasticsearch health.
2. Your App Search engine is having a lot of underlying write operations (documents ingested/deleted) while these queries are running. So the queries are actually accurate, in that the available document matches change from one moment to the next.

---

<div class="post-metadata">

**Author:** ![Chenko](https://avatars.discourse-cdn.com/v4/letter/c/258eb7/32.png) [@Chenko](https://discuss.elastic.co/u/Chenko)\
**Post date:** [April 16, 2024, 1:29pm UTC](https://discuss.elastic.co/t/app-search-rate-limiting-search-requests/357518/3 "2024-04-16T13:29:35Z")

</div>

Hi @Sean_Story Thanks for the swift response!

> [@Sean\_Story](#):
>
> - Your Elasticsearch is unhealthy, and having shard errors. This means that depending on which node services the App Search request, you're getting different/no results. Check your Elasticsearch health.

1. The cluster is healthy except for only having one zone which couses its health to be Healthy, with warnings.

> [@Sean\_Story](#):
>
> 1. Your App Search engine is having a lot of underlying write operations (documents ingested/deleted) while these queries are running. So the queries are actually accurate, in that the available document matches change from one moment to the next.

1. No writes are being done when this process is happening.

Also may I add that when the app first launches the first +-100 requests are super quick with perfect results, however after the first time getting no results it happens every second, 2 seconds sleeping after encountering no documents, getting 2 documents, and it happens again, in a loop..

Also I forgot to add We are using v8.11, might be an issue that is not on the latest version(8.13)?

---

<div class="post-metadata">

**Author:** ![Kathleen\_DeRusso](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kathleen_derusso/32/132039_2.png) [@Kathleen\_DeRusso](https://discuss.elastic.co/u/Kathleen_DeRusso)\
**Post date:** [April 16, 2024, 1:35pm UTC](https://discuss.elastic.co/t/app-search-rate-limiting-search-requests/357518/4 "2024-04-16T13:35:32Z")

</div>

Hey there @Chenko along with @Sean_Story 's suggestions I would like to know if the Enterprise Search logs are reporting any warnings or errors when you get back the empty result sets? Also, when empty responses are returned what is the HTTP status code? That may help better diagnose exactly what's happening.

---

<div class="post-metadata">

**Author:** ![Chenko](https://avatars.discourse-cdn.com/v4/letter/c/258eb7/32.png) [@Chenko](https://discuss.elastic.co/u/Chenko)\
**Post date:** [April 16, 2024, 1:42pm UTC](https://discuss.elastic.co/t/app-search-rate-limiting-search-requests/357518/5 "2024-04-16T13:42:16Z")

</div>

Hi @Kathleen_DeRusso ,

> [@Kathleen\_DeRusso](#):
>
> Enterprise Search logs

Do you mean the App Search API Logs? if so, none.  
If you mean the logs stored in the `logs-enterprise_search-api...` I also do not see any errors here.

> [@Kathleen\_DeRusso](#):
>
> Also, when empty responses are returned what is the HTTP status code?

Both the App Search API logs and logs index tell me it returns a 200, without errors.

---

<div class="post-metadata">

**Author:** ![Kathleen\_DeRusso](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kathleen_derusso/32/132039_2.png) [@Kathleen\_DeRusso](https://discuss.elastic.co/u/Kathleen_DeRusso)\
**Post date:** [April 16, 2024, 3:42pm UTC](https://discuss.elastic.co/t/app-search-rate-limiting-search-requests/357518/6 "2024-04-16T15:42:31Z")

</div>

Thanks. What about the Elasticsearch logs? Are there any errors logged there?

---

<div class="post-metadata">

**Author:** ![Chenko](https://avatars.discourse-cdn.com/v4/letter/c/258eb7/32.png) [@Chenko](https://discuss.elastic.co/u/Chenko)\
**Post date:** [April 16, 2024, 4:26pm UTC](https://discuss.elastic.co/t/app-search-rate-limiting-search-requests/357518/7 "2024-04-16T16:26:50Z")

</div>

I am not sure if I can see these as the metrics & logging is not enabled in the cloud. Is there still a way to see this? We did not enable this as we would most likily need more resources in our QA deployment.

---

<div class="post-metadata">

**Author:** ![Sean\_Story](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sean_story/32/69987_2.png) [@Sean\_Story](https://discuss.elastic.co/u/Sean_Story)\
**Post date:** [April 16, 2024, 4:48pm UTC](https://discuss.elastic.co/t/app-search-rate-limiting-search-requests/357518/8 "2024-04-16T16:48:43Z")

</div>

I'd missed that this is on a cloud instance.

I suggest reaching out to support directly. As an Elastic Cloud customer (even during a trial period), you're entitled to support services through [http://support.elastic.co](http://support.elastic.co)

They'd be able to look at your Elasticsearch and Enterprise Search logs and help you debug the issue more effectively than we can through this forum.

---

<div class="post-metadata">

**Author:** ![Chenko](https://avatars.discourse-cdn.com/v4/letter/c/258eb7/32.png) [@Chenko](https://discuss.elastic.co/u/Chenko)\
**Post date:** [April 16, 2024, 5:24pm UTC](https://discuss.elastic.co/t/app-search-rate-limiting-search-requests/357518/9 "2024-04-16T17:24:54Z")

</div>

Thanks, I did not realize this, I thought it was only for platinum and above!

---

<div class="post-metadata">

**Author:** ![Chenko](https://avatars.discourse-cdn.com/v4/letter/c/258eb7/32.png) [@Chenko](https://discuss.elastic.co/u/Chenko)\
**Post date:** [April 16, 2024, 5:32pm UTC](https://discuss.elastic.co/t/app-search-rate-limiting-search-requests/357518/10 "2024-04-16T17:32:10Z")

</div>

> [@Sean\_Story](#):
>
> even during a trial period

I am looking at the support options however I see that technical support is unavailable for this account. We do however currently have an active deployment with ECU's (Maybe because we are using ECU's? However we still should have a gold subscription).

Screenshot:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/d/a/dad9b6bb140ba11b9e2d7fccbff3515ae1d0ba6d.png)

---

<div class="post-metadata">

**Author:** ![Sean\_Story](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sean_story/32/69987_2.png) [@Sean\_Story](https://discuss.elastic.co/u/Sean_Story)\
**Post date:** [April 16, 2024, 6:17pm UTC](https://discuss.elastic.co/t/app-search-rate-limiting-search-requests/357518/11 "2024-04-16T18:17:24Z")

</div>

Hmm, IDK why that's greyed out for you. Can you email [support@elastic.co](mailto:support@elastic.co) and ask if they can tell you why that's not available? I don't want to have you provide any identifying information in this thread, which is why I'm suggesting you shoot them an email.

---

<div class="post-metadata">

**Author:** ![Chenko](https://avatars.discourse-cdn.com/v4/letter/c/258eb7/32.png) [@Chenko](https://discuss.elastic.co/u/Chenko)\
**Post date:** [April 16, 2024, 6:28pm UTC](https://discuss.elastic.co/t/app-search-rate-limiting-search-requests/357518/12 "2024-04-16T18:28:34Z")

</div>

Yes, indeed thanks for the help!

---

<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:** [May 14, 2024, 6:29pm UTC](https://discuss.elastic.co/t/app-search-rate-limiting-search-requests/357518/13 "2024-05-14T18:29:29Z")

</div>

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