SaaS CMS has officially launched! Learn more now.

Epi app on Azure gives 502 Web server received an invalid response while acting as a gateway or proxy server


Typical Epi site on the DXP. Have not been able to reproduce locally.

There is a scheduled job that pulls data from an external API using HttpClient and then indexes through Find-client.

Sometimes the job logs this sort of merged into the Execute result string:

The remote server returned an error: (502) Bad Gateway.

Server Error

502 - Web server received an invalid response while acting as a gateway or proxy server.

There is a problem with the page you are looking for, and it cannot be displayed. When the Web server (while acting as a gateway or proxy) contacted the upstream content server, it received an invalid response from the content server.

I see the Application Insights key from the script in the "embedded" error page and it comes from the application that holds the job.

Anyone been digging around similar thing and found something?

Oct 05, 2020 6:10
Johan Kronberg - Mar 02, 2021 22:30
Turns out it was Find-indexing where the service was giving timeouts.
Binh Nguyen - Sep 16, 2021 4:32
Hi Johan,

Did you have any solution for this issue? I am getting same issue when running Find indexing job. Please help to give me your recommendation about this.

Thanks a lot

In my case we were indexing through our own job so we could add logging to see which object was failing. We had a really large set of items in a List<x>-property on that one.

We couldn't change it easily so one solution was to only have one language configured on the Find service side.

When this site had been setup someone had ordered many languages (never going to be used) and each language extends the time it takes to index.

Sep 16, 2021 5:51

Thanks for your suggestion Johan. I think we are facing to the large object in the document item as well. Your idea is so worth with me. Thanks again.

Sep 16, 2021 5:56
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.