Maulik Modi
Maulik Modi

Reputation: 1316

Azure Logic App: Why FTP Connector delays to Identify files over FTP connector?

I have been working with FTP connector in my AzureLogicApp for unzipping files in FTP server from Source to Destination folder.

I have configured FTP connector to Trigger whenever the file is added in Source folder.

The Problem I face is the delay to Trigger the connector here.

Once I add the zipfile in source folder, It would take around 1 minute for the Azure FTP connector to identify and Pick the file over FTP.

To identify if the issue is with Azure FTP connector or FTP server, I tried using BLOB storage instead of FTP server and The connector was triggered in a second.!!!

What I understand by this is, The delay happens from FTP side, or the Way FTP connector communicates with FTP server.

Can Anyone tell the areas of optimization here? What possible changes I can make to minimize this delay.?

Upvotes: 2

Views: 651

Answers (2)

Jerome Munchenberg
Jerome Munchenberg

Reputation: 11

I also noticed this behaviour of the FTP trigger and found the reason for the delay in the FTP Trigger doco here:

https://learn.microsoft.com/en-us/azure/connectors/connectors-create-api-ftp#how-ftp-triggers-work

...when a trigger finds a new file, the trigger checks that the new file is complete, and not partially written. For example, a file might have changes in progress when the trigger checks the file server. To avoid returning a partially written file, the trigger notes the timestamp for the file that has recent changes, but doesn't immediately return that file. The trigger returns the file only when polling the server again. Sometimes, this behavior might cause a delay that is up to twice the trigger's polling interval.

Upvotes: 1

George Chen
George Chen

Reputation: 14334

Firstly you need to know, the logic app file trigger has some difference from the Function, mostly it won't trigger immediately, when you set the trigger you will find it need a interval. Even there is a file, however there is a interval it won't trigger right now.

Then it's about how ftp trigger works, when it trigger the logic app, if you check the trigger history you will find it has multiple Succeeded however only one fired history and there is a 2 minutes delay. The reason you could check the connector reference: How FTP triggers work. There is a description about this.

The trigger returns the file only when polling the server again. Sometimes, this behavior might cause a delay that is up to twice the trigger's polling interval.

enter image description here

enter image description here

Upvotes: 0

Related Questions