PeterSharp-4330 avatar image
0 Votes"
PeterSharp-4330 asked MartinJaffer-MSFT commented

Azure function blob creation trigger doesn't fire unless I open the app

I needed to output some data in a custom CSV format, and quickly discovered that it couldn't be done directly in data factory. After a fair amount of trial and error, I have set up an Azure Function to take a json file, generated with a scheduled trigger in data factory, and convert it to the desired format.

The function and the process all seem to work fine, assuming I am actively viewing the function.

If left unattended, overnight for example, the input JSON file is generated, but the function isn't triggered by the blob creation and it therefore never processes the file.

What is annoying though is that if I simply navigate to the function app, it suddenly 'wakes up', detects the files, and executes as intended.

Does anyone happen to know why this is the case, and what can be done to make it stay awake?


· 3
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.

Hello @PeterSharp-4330 and welcome to Microsoft Q&A.

This sounds like it would be an issue with Function app, not Data Factory, correct?

I am reasonably certain the app should process the files without your browser watching it. However, the browser might not update unless you are viewing it. To differentiate between the reporting and the app behavior, have you tried searching for the output files by other means, such as Storage Explorer or wherever the output is stored?

0 Votes 0 ·

I definitely think that the issue is with the Function app, but I wasn't sure if the interaction with data factory was a factor.

It seems that it is not. I've since been told by support that it relates to the issue described here.

The thing is, I've only used the functions portal to build and create the function, so this issue shouldn't apply to me. Additionally, going to the function app page and refreshing does make it work. I know this works. But it does NOT keep it running. For the past few days I've just been manually going in and refreshing the page to get the thing to pick up the trigger files.

It is unclear to me what the next step is. The Function App simply doest continue running, and I get the impression that this is by design. I've asked for clarification from my support ticket, but it's been two days without response, so I'm not really confident of hearing anything further.

Any thoughts anyone might have regarding how to resolve this would be great. Apparently I can send an HTTP POST request to the service to do the same thing as refreshing the page, so I could probably add this as a step to file creation, but it seems insane to me that this 'consumption' mode Function App goes to sleep and wont wake without intervention. It seems to defeat the point.


0 Votes 0 ·

Yikes. Also, I agree.

My understanding, is Data Factory runs on a schedule, and then you use the Function app activity to trigger the funtion app to consume the generated file.

Maybe I misunderstood, but it sounds like you said, sending the same payload to the Function app by a web post, made the Function app work correctly?

If that is so, it is totally possible to use the ADF Web Activity to trigger the Function app instead of using the Function Activity. That, I have done before.

Beyond this, I'll have to pass you off to my colleague who works on Function App.

0 Votes 0 ·

0 Answers