Azure / Azure/azure-functions-host

General help troubleshooting bottleneck in simple azure function

Open
#2,121 1 comment 0 reactions 1 assignee Claimed by @mathewc View on GitHub
Dominant language
C#
Stars
2k
Forks
482
Avg merge
2d 10h
Merged PRs (30d)
36

Description

Hi guys,

I was advised reposting this here from https://social.msdn.microsoft.com/Forums/azure/en-US/88b3c06a-2383-4ff0-861a-e9e507ad88f1/troubleshooting-bottleneck-in-simple-azure-function?forum=AzureFunctions

Any pointers?

I have a simple azure function accepting a webhook and immediately

writes into 2 storage queues (code below).

Today I triggered something that made the webhook be called approximately a few hundred times over a a short period of time (I'm guessing it was just invoked about 1.500 times in a loop by the external service).

The first dozen calls went through just fine but than the runtime seemed to hang and after restarting a couple of times it seems like the function calls were retried in bursts and mostly succeeded. Checking the monitoring I often saw dozens of functions hanging (...) for over 80 seconds.

The function app runs on a Basic plan and I didn't see any peaks in CPU or memory in the time period.

I want to understand better why the runtime behaves like this and how I can diagnose these issues and potentially remove bottlenecks before scaling up. Seems to me this kind of work (only IO bound, using node and azure storage and fn bindings) should be a perfect fit for azure functions and I should run into performance problems already.

Any help is much apprecheated.

```
module.exports = function (context, data) {
context.bindings.queue1= [{
PartitionKey: 'part1',
RowKey: data.event + "-" + Date.now(),
Value: 1.0
}];

context.bindings.queue2 = [{ action: 'event', name: data.event }];
context.done();
}
```

Function is:
```
2017-11-03T13:24:22.978 Function started (Id=a736f5c0-f45c-482c-bce7-ad4a1cf68291) South Central US
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.