I am calling a .NET 7 web API POST endpoint from another C# command line application.
The endpoint is returning a 502 error consistently after 2 minutes but the endpoint is still continuing processing even though the 502 is returned. This doesn't happen when I call a debug version locally but happens when I call the deployed version, configured via IIS.
I have tried the following things but none seem to resolve the issue:
- Large timeout on the http client in the c# application that is calling the API
- Increasing the Connection timeout limit in IIS
- Setting keep alive timeout during start up of the web API