Forum Discussion
Kalyani1714
Jun 28, 2023Copper Contributor
Azure Function connection error with SFTP Server
Hello, I have Timmer trigger function, which runs every minute and reading the files from SFTP servers (reading files for multiple servers around 20 servers) and for each instance, new connection create for communicate with server and close after reading the files. I am using WinSCP dll. and function app running on Consumption plan
Issue: Getting an error "WinSCP.SessionRemoteException: Server unexpectedly closed network connection." after few hours and it will remain until I restart the function app.
1 Reply
Sort By
- habeebyakubuCopper ContributorAzure functions are not intended for long running background tasks. Look for a way to reduce the opened session time from within the code. Perhaps, premium plan could help, but I would also not advice.