Hello!
I have a problem with a flow in Power Automate. There is a flow which every time a file is created in OneDrive's directory replicates this file to a remote server via SFTP connection.
This flow processes a few hundreds files every day. For most of them the flow works without any issue, it normally takes < 1 second to process the file. However, every day there are 2-3-5 cases when the file transfer fails:
The error message says "BadGateway" with the status 502, error comment is "An established connection was aborted by the server." That is strange because those files are similar to hundreds of other files which go through to the final destination without a problem.
We had some problems with file name's length (>256 symbols or something like this) some time ago, but after that case we implemented shortening of file name, these files we're having problems with have the same file name length as other files (nearly 190 symbols normally). The file size is normal as well, about 30-50 kb.
On Power Automate side we dont have much more details regarding why this is happening, apart from the error code I've mentioned. Whats even more strange, our network admin told me this 502 error code is related to HTTP protocol, not SFTP, so its unclear why do we even get this. Likely this error is whats being passed to us from some intermediate servers on Microsoft side, but basically this is a black box for us.
With this in mind, I wanted to ask community for help, because I've ran out of options. What can be the reason that 95% of files every day are being transferred via SFTP protocol successfully, but 5% of files fail? What can be the difference between those files, to cause a problem when uploading to a server?
Thank you!