Azure Logic Apps Timeout scenarios When Calling Azure Function with Http Trigger
I tried several approaches but none seem to work. After trying multiple solutions online, I still can't figure this out... I'm experiencing a timeout scenario when my Azure Logic App tries to call an Azure Function with an HTTP trigger. The Logic App is designed to invoke the function every hour, but often I receive a `504 Gateway Timeout` behavior after 6 minutes of waiting. I've ensured that the Azure Function app has the correct timeout settings, with the `FUNCTIONS_TIMEOUT` environment variable set to `00:10:00`. The function itself processes data from an external API and can occasionally take longer than expected due to network latency. I have tried increasing the timeout in the Logic App's action configuration to 10 minutes, but it still times out. I also checked the Azure Function logs, and they show that the function starts executing, but the HTTP response isn't sent back to the Logic App in time. Here's a simplified version of the Azure Function code: ```csharp [FunctionName("MyFunction")] public static async Task<IActionResult> Run( [HttpTrigger(AuthorizationLevel.Function, "get", "post", Route = null)] HttpRequest req, ILogger log) { log.LogInformation("C# HTTP trigger function processed a request."); string responseMessage; try { // Simulate long-running operation await Task.Delay(600000); // Delay for 10 minutes responseMessage = "Function executed successfully."; } catch (Exception ex) { log.LogError(ex, "behavior executing function"); return new StatusCodeResult(StatusCodes.Status500InternalServerError); } return new OkObjectResult(responseMessage); } ``` The function is supposed to process data and return a success message. However, when I run it directly from the Azure portal, it completes successfully without any timeout. I've also checked the Azure Logic Apps settings, and everything seems correctly configured. Is there a way to resolve this timeout scenario or a workaround to ensure that the Logic App can handle longer-running Azure Functions? For context: I'm using C# on macOS. Is there a better approach? I'm working on a CLI tool that needs to handle this. I'm working on a web app that needs to handle this. Am I missing something obvious? The project is a application built with C#. Is there a better approach?