Page 1 of 1

FTP Upload script not closing connections

PostPosted: Thu Mar 01, 2018 3:27 pm
by mdeniken
I have a hazel script that watches a folder and when a file is placed into it, it connects to a remote FTP server, uploads the file and moves the files to a "Done" folder.

I have been having what I thought was a password reset problem on my end, but turns out the script is keeping 10 active connections open on their server, so we are maxing out the number of concurrent connections and thus getting shut down when attempting a new one.

They tried to adding a setting to kill any connection after 30 minutes of inactivity, which should've solved this issue. But didn't.

Is it possible to adjust the hazel script to close the FTP connection after the upload is successful?

Re: FTP Upload script not closing connections

PostPosted: Fri Mar 02, 2018 10:40 am
by Mr_Noodle
Just to be clear, are you using Hazel's Upload action or uploading via a custom script?

Re: FTP Upload script not closing connections

PostPosted: Fri Mar 02, 2018 11:19 am
by mdeniken
Yes, I am using the Hazel upload action.

Also, I failed to mention that I have two scripts that run on the same mac that upload to different directories to the same FTP server.

Re: FTP Upload script not closing connections

PostPosted: Mon Mar 05, 2018 11:49 am
by Mr_Noodle
I'll need to look into it some more but I believe the connections are pooled on the client side which could result in this case. Is the server accessible via other protocols? If so, it might be worth testing those out to see if you get the same issue or if it's something FTP specific.