# Troubleshooting 502 Errors During Elasticsearch Indexing

**URL:** <https://discuss.elastic.co/t/troubleshooting-502-errors-during-elasticsearch-indexing/373450>\
**Category:** Elasticsearch\
**Created:** [January 21, 2025, 12:15pm UTC](https://discuss.elastic.co/t/troubleshooting-502-errors-during-elasticsearch-indexing/373450 "2025-01-21T12:15:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rayliotta](https://avatars.discourse-cdn.com/v4/letter/r/258eb7/32.png) [@Rayliotta](https://discuss.elastic.co/u/Rayliotta)\
**Post date:** [January 21, 2025, 12:15pm UTC](https://discuss.elastic.co/t/troubleshooting-502-errors-during-elasticsearch-indexing/373450/1 "2025-01-21T12:15:44Z")

</div>

Hi

I've been encountering 502 errors when attempting to index large documents. Has anyone else faced similar issues, and how did you troubleshoot and resolve them? I'm particularly interested in understanding potential causes and effective troubleshooting steps for handling document indexing errors in Elasticsearch,

> **'**
>
> [https://www.concretesrichmondva.com/](https://www.concretesrichmondva.com/)

Thanks for any help!

---

<div class="post-metadata">

**Author:** ![RainTown](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/raintown/32/140206_2.png) [@RainTown](https://discuss.elastic.co/u/RainTown)\
**Post date:** [January 21, 2025, 1:39pm UTC](https://discuss.elastic.co/t/troubleshooting-502-errors-during-elasticsearch-indexing/373450/2 "2025-01-21T13:39:11Z")

</div>

Hi

welcome to the forum

> [@502 error when indexing a large (?) document](https://discuss.elastic.co/t/502-error-when-indexing-a-large-document/373209):
>
> Hello I am having trouble diagnosing and resolving a large document upload issue... I'm using elasticsearch SaaS and there is a document which is approximately 42MB, when my software attempts to index it I get an error: "{Invalid NEST response built from a unsuccessful (502) low level call on PUT: /document/\_doc/GyIAAERPFiO3CbRqgqB8ojQEGImqU4GmI\_r4f5xNqLBLoAg3}" I'm not sure where to go from here, I would have thought there would be more details somewhere in logs somewhere but I'm not sure wh…

is an ongoing thread around a similar issue.

How large is your large document?

And is there anything in the Elasticsearch log itself?

Are you using a local cluster, or via Elastic Cloud? (versions?)
