Problem: sFTP excessive connections to Server

:bullseye: What is your goal?

I have a workflow that traverses a sFTP on a Synology, loads a file, saves the file in a target folder, then (AI) renames the file and finally deletes the original file.
moving the File(which would be way easier) gave me an error.

:thinking: What is the problem & what have you tried?

it seams that make.com (sFTP) opens a separate connection for each of the 5 Modules. (this is shown by the logs). The Server now warns my client of a possible intruder. I really have no Idea how to solve this issue. Is there some kind of “keep allive” or “keep using the SAME Connection” preventing make from initially opening 5 connections to the same Server …

:clipboard: Error messages or input/output bundles

No Error Messages but slow performance and an irritated customer at hand. The sFTP is on a Synology drive that is connected to the internet and accessed via synology.me. Static IP is not available.

1 Like

Hey there,

What error is moving the file giving you?

Technically uploading the file to the new folder and renaming it should be doable in the same call.

I thought so too. But moving the files gives me the following Error:

”InvalidConfigurationError
4: Failure - Failure”

File (can be read with “get a File” no Problem) /XXX_Sync/test.pdf
Targetfolder /target/

It shouldn’t make a difference … :pensive_face:

Will your server accept SSH connections? Could you just run mv with the SSH module to move and rename the file?

Thanks for your response. I will look into that. But to be clear: I can live without moving files in one go. My problem is that upon starting the scenario every sftp related module establishes his own connection to the server (this might also be the problem with the move module). Is this normal or expected behavior? I did not seem to have this problem before …

You hit an edge case here. That’s an issue with automation tools in general. Each module has its own complete lifecycle, with input, processing and output. It’s like a full system on its own.

Since individual modules are not aware of the previous or next module, they’re not optimized for long-lived connections.

The (s)FTP protocol is very different from HTTP in that respect. Connections are costly, so operations are better stacked.

Make’s decision was to give each module its own functionality, despite this cost. Thus, the Move file operation does not support a new filename and the Rename a file operation does not support a new directory.

I believe your best bet is to use sFTP to handle file download/upload and work any changes with SSH or build a custom app for your use case.

The code app probably won’t help you as well, since you won’t be able to import libraries needed for sFTP.

@damato

@damato You are Spot on! Thanks for the great explanation in Detail. That really helps my case. I will try to direct to SSH to minimize the cost you mentioned.

What a great community.

2 Likes