Azure / logicapps

Azure Logic Apps labs, samples, and tools
MIT License
363 stars 301 forks source link

Logic app standard HTTP action sent duplicate POST request without any reason (returns simply success of the second call) #1136

Open spulkkinen opened 1 month ago

spulkkinen commented 1 month ago

Describe the Bug

The HTTP connector of the Logic App has sent an HTTP request (to the function) twice in a row (no failure in either of the function calls, and there is not even a retry policy in the HTTP action). In the run history, it only shows one action call without errors or retries, with the duration of the action spanning from the start of the first request to the end of the second one. The action also simply returns the response from the second HTTP request with success status code. No trace of any retries in the run history for that action (retry policy is set to none and no loops etc. or any other errors in the run).

LogicAppActionOutputs

On the other hand, the logs of the Azure function called by the HTTP action show traces of two requests coming from the same workflow run (we track in application insights the workflow run id among other things).

DuplicateCalls

Each of the function calls has taken approx. 30s so there is no timeout issues. We can see from AppRequests table that both calls have returned 200 success. image

So far, this is just an isolated case, usually there are no problems (with hundreds of successful runs).

Plan Type

Standard

Steps to Reproduce the Bug or Issue

Only happened couple of times, hard to reproduce. Seems to happen at random: if the workflow run is retriggered, everything goes without problems.

Workflow JSON

Action in question { "type": "Http", "inputs": { "uri": "@{parameters('ContractIntegrationFunctionURL')}", "method": "POST", "headers": { "x-functions-key": "@{parameters('ContractIntegrationFunctionKey')}" }, "body": "@body('HTTP_POST_LTINT773GetContractReferenceDataFunction')", "retryPolicy": { "type": "none" } }, "runAfter": { "HTTP_POST_LTINT773GetContractReferenceDataFunction": [ "Succeeded" ] } }

Screenshots or Videos

Additional context

This is a business critical process where function creates data to target (contract to D365 FO). In no circumstances POST requests should be sent several times (unless requested by the retry policy). Please investigate to locate the root cause.

spulkkinen commented 3 weeks ago

The issue has unfortunately reappeared, now in production environment.