'Azure API - Azure SQL
I have deployed my ASP.net core API on Azure (app service). This API is supposed to fetch data per group of hospitals and import it into Azure SQL. (same region, connection: managed Identity). It works fine for small hospitals which have 100 records. But I get the below error for more than 100 records. (session time out is set to 6min) Error: 502 - The web server received an invalid response while acting as a gateway or proxy server any advice or suggestion to help me on this issue? Note: The API works fine when I connect from my dev env to the DB. Thank you
Solution 1:[1]
Error: 502 - The web server received an invalid response while acting as a gateway or proxy server
502 errors are returned by the front end server, there can be many reasons for this errors.
Check the firewall setting in Azure portal
Make sure the TLS/SSL Bindings are Valid
Check whether there is any network connection broken
Re-deploy the app and check again once
Check the Connection String properly
504 Gateway Time-out
- 504 Error response indicates that the client did not receive a timely response from browser or the backend server during the execution of an API call.
- In SQL Query, while fetching data , Watch out for what you are returning in your APIs. You might be returning more properties . Try to remove extra column data will reduce the schema size.
Please refer Troubleshoot HTTP errors of "502 bad gateway" for more information
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | HarshithaVeeramalla-MT |
