cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

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
Community Support

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.

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).

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
Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (82,222)