# Getting 502 bad gateway for a particular query

**URL:** https://discuss.elastic.co/t/getting-502-bad-gateway-for-a-particular-query/348052
**Category:** Kibana
**Created:** [November 27, 2023, 1:13pm UTC](https://discuss.elastic.co/t/getting-502-bad-gateway-for-a-particular-query/348052 "2023-11-27T13:13:51Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Nishant\_Garg](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nishant_garg/32/128080_2.png) [@Nishant\_Garg](https://discuss.elastic.co/u/Nishant_Garg)
#### Post date: [November 27, 2023, 1:13pm UTC](https://discuss.elastic.co/t/getting-502-bad-gateway-for-a-particular-query/348052/1 "2023-11-27T13:13:51Z")

</div>

```auto
GET */_search
{
  "size": 10000,
  "query": {
    "bool": {
      "should": [
        {"match": {"imei": "value"}},
        {"match": {"imei1": "value"}},
        {"match": {"IMEI": "value"}}
      ]
    }
  }
}

```

this same query is working on all other servers except one. Also on the same server where I am getting 502, other queries are working fine.

Below is the error I am getting here.

```auto
<html>
<head><title>502 Bad Gateway</title></head>
<body>
<center><h1>502 Bad Gateway</h1></center>
<hr><center>openresty</center>
</body>
</html>
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->

```

---

<div class="post-metadata">

### Author: ![tsullivan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tsullivan/32/31077_2.png) [@tsullivan](https://discuss.elastic.co/u/tsullivan)
#### Post date: [December 1, 2023, 9:51pm UTC](https://discuss.elastic.co/t/getting-502-bad-gateway-for-a-particular-query/348052/2 "2023-12-01T21:51:22Z")

</div>

> [@Nishant\_Garg](#):
>
> `<hr><center>openresty</center>`

Looks like you will want to check the logs/status of `openresty`, which is not affiliated with Kibana.

---

<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: [December 29, 2023, 9:51pm UTC](https://discuss.elastic.co/t/getting-502-bad-gateway-for-a-particular-query/348052/3 "2023-12-29T21:51:36Z")

</div>

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