question

RodolfoMacaraeg avatar image
0 Votes"
RodolfoMacaraeg asked MayankBargali-MSFT commented

Azure APIM requests count do not match Function App requests count

We have a project that is hosted via Azure Function app, and sits behind APIM. We noticed that the number of requests in APIM is not equal to the number of requests in the Function App. Also checking the requests on APIM, they are all success == true and resultcode ==200. But those requests were not able to trigger the function app. We verified that our function app was not triggered as no updates were found on the other application being called by the function app. We also noticed that this only occurs during high volumes of request coming in. Are there any settings or configurations, we need to check with this?

azure-functionsazure-api-management
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@RodolfoMacaraeg-5593 Can you confirm if you have created any outbound policy/on-error policy to change the response. If there are no outbound policy/on-error policy then whatever response the backend API (function app HTTP trigger) return the same should be return from the APIM. If the backend API has responded 200 then the function should have triggered. Can you share more details what logs you have looked into that confirms that the APIM has returned 200 response but your backend function app didn't trigger. The request count could give you count but you cannot confirm what was happen to the individual request.

0 Votes 0 ·

Thank you @MayankBargali-MSFT ! I can confirm that we have no outbound/on-error policy to change response nor inbound policy to change request.

Below is a snippet of one APIM log with response 200. Though we are not able to actually correlate/link it with the backend function app, I'm pretty sure some of these APIM requests are dropped before entering backend function app since no data were processed from the backend (aside from checking the backend function app logs and/or request count).
122106-image.png


122089-image.png


0 Votes 0 ·
image.png (24.2 KiB)
image.png (53.4 KiB)

1 Answer

RodolfoMacaraeg avatar image
0 Votes"
RodolfoMacaraeg answered MayankBargali-MSFT commented

Sorry. I seem to know the answer for this. I was not able to incorporate the itemCount on my query on the Function App. It's now almost matching with negligible difference.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@RodolfoMacaraeg-5593 Thanks for your response and glad to know that you were able to find the root cause. I have converted your comment to answer. Feel free to "Accept it as Answer" so it could help other community member facing the similar issue.

1 Vote 1 ·