cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
PieterN
Level: Powered On

High number of connections to SFTP

Good day

 

I have roughly 20 flows that each trigger when a new file is created on different SFTP folders.

These folders usually have activity once a month or once a week. If it gets triggered, among other steps, it copies the file to a new location on the same SFTP and deletes the old file.

 

MS Flow checks for new files every minute. This resulted in me getting bugged by our IT department regarding the number of connections on my SFTP account (was apprently >8000 in 12 hours). Is this normal?

 

Is there a way to reduce this (for example change the check time for certain flows to every 60mins?)

 

Thanks

3 REPLIES 3
Community Support Team
Community Support Team

Re: High number of connections to SFTP

Hi @PieterN ,

 

Are the roughly 20 flows triggered by When a new file is created on different SFTP folder?

 

You mentioned that “it copies the file to a new location on the same SFTP”, I am wondering the if there is another flow on the new location which will trigger another flow?

 

With the trigger When a new file is created, it only triggers the flow when a new file is created.

 

However, you could try to turn on Concurrency Control and set its Degree of parallelism to 1 under Settings.

Note: please turn off Split on.

 

Then when multiple files are added, only one Flow run at a time. It will run with a batch of files that we’ll need to handle individual, but they don’t overlap.

 

The following blog could be a reference for you:

http://johnliu.net/blog/2018/2/serverless-parallelism-in-microsoft-flow-and-sharepoint

 

Best regards,

Mabel

 

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
PieterN
Level: Powered On

Re: High number of connections to SFTP

Hi Mabel

 

Thanks for the reply.

I didn't know about that setting but I can defnitifly use it elsewhere.

 

To answer your questions:

- Yes different folders on the same SFTP is monitored.

- The files also gets created on different SFTP folder that is not monitored (A folder named "Processed")

 

I think the problem is that MS Flow is checking 20 flows x 60min x 24 hours = 28800 times a day

And this for folders that will only get action once a week/month seems a bit of an overkill.

 

So I would have hoped there is some way you can change the refresh interval to slower than the default 1min (or what ever the maximum interval is for your MS Flow Account).

PieterN
Level: Powered On

Re: High number of connections to SFTP

Is there any way to achieve this in the flow itself?

For example:

Trigger flow every morning at 8am and look if any files was added to a specific SFTP folder.

 

I tried using the "Recurrence" trigger and then step two has another trigger (not sure if this will work) for SFTP when new file is added.

When I tried the above flow it immediately completed step 1 and then waited on step 2 until a file was added to the SFTP.

 

Helpful resources

Announcements
firstImage

New Ranks and Rank Icons in April

Read the announcement for more information!

firstImage

Better Together Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Users online (9,048)