Azure Mobile SDK iOS - Returns HTTP error 502 while retrieving data from MS SQL RRS feed

  • Question

  • Hi,

    We have deployed mobile application using Azure mobile SDK. When we are trying to pull from MS SQL, at times we get error returned with HTTP Error code 502 with html response. We are not sure root cause of this request . Any pointer to this are appreciated.

    Environment details:

    SDK: Azure Mobile SDK for iOS 3.4

    Container: Azure App Server ( IIS -.Net)

    DB: MS SQL

     ERROR received for the request

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
    <title>502 - Web server received an invalid response while acting as a gateway or proxy server.</title>
    <style type="text/css">
    body{margin:0;font-size:.7em;font-family:Verdana, Arial, Helvetica, sans-serif;background:#EEEEEE;}
    fieldset{padding:0 15px 10px 15px;} 
    h3{font-size:1.2em;margin:10px 0 0 0;color:#000000;} 
    #header{width:96%;margin:0 0 0 0;padding:6px 2% 6px 2%;font-family:"trebuchet MS", Verdana, sans-serif;color:#FFF;
    #content{margin:0 0 0 2%;;}
    <div id="header"><h1>Server Error</h1></div>
    <div id="content">
     <div class="content-container"><fieldset>
      <h2>502 - Web server received an invalid response while acting as a gateway or proxy server.</h2>
      <h3>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.</h3>


    Friday, January 10, 2020 9:59 PM

All replies

  • Hi vsudhakar, Have a look at https://docs.microsoft.com/en-us/azure/app-service/troubleshoot-http-502-http-503 for tips on how to resolve your issue. I would also temporarily enables application insights that will help you isolate the root cause. My first thought since the error is sporadic is a possibly slow running query that's timing out. Do you have the full StackTrace available to you?

    Thanks in advance, Ryan

    Thursday, January 16, 2020 3:20 PM
  • As suggested we requested to enable Azure App Insights. Thanks


    Thursday, January 23, 2020 8:52 PM