Sign in to follow this  
Followers 0
UnknownWarrior

FTP Idle Connections

7 posts in this topic

Got a major dilemna, and after talking to my web hoster, they finally pinpointed the error -- my FTP connections aren't closing.

I have $i_passive set to 1 (so it closes the connection afterward), but it still isn't. My web hosting only allows 25 open processes at a time, and I am running three AutoIt scripts on three separate machines (all Windows VPS). When I was running just two, it was fine, but when I added the third it seems to have breached that 25 limit.

What the support told me was that when I was running two scripts, the processes eventually died out in time - therefore never reaching 25. Well, now with 3, they aren't dieing fast enough and is causing my server to crash.

So my question is -- why aren't my FTP connections closing after I use _FTP_FilePut and what can I do so it closes the connections immediately?

Share this post


Link to post
Share on other sites



... and you are always doing an _FTP_Close($Open) command in your script?

I do it at the end of my script (from what I interpretted from the HelpFile) -- which runs basically 24/7. Do I need to Open, FilePut, Close every single time I want to put a file on my server?

Share this post


Link to post
Share on other sites

I do it at the end of my script (from what I interpretted from the HelpFile) -- which runs basically 24/7. Do I need to Open, FilePut, Close every single time I want to put a file on my server?

I would do that in case you are not going to use the connection for a while. Many FTP servers would have a timeout on a session anyway which would require a start of a new session.

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

I would do that in case you are not going to use the connection for a while. Many FTP servers would have a timeout on a session anyway which would require a start of a new session.

Jos

I use the connection once every 6-8 minutes.

Will connecting/closing every time cause a lot of extra load?

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Will connecting/closing every time cause a lot of extra load?

Connectivity load or otherwise?

As far as connectivity overhead... that is minimal as you can see from the normal login sequences happening between the client and server.

I expected the server session to be timed-out by then.

Jos

Edited by Jos

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Connectivity load or otherwise?

As far as connectivity overhead... that is minimal as you can see from the normal login sequences happening between the client and server.

I expected the server session to be timed-out by then.

Jos

As in my scripts computer runtime (I've never timed how fast the FTP Open/Close take haha). But I made the change and it seems to be working right now.

I use HostGator and their timeout must be about 10 minutes, because I was running two of my scripts just fine with this error, and became aware of it when I added the third which caused an extra FTP connection every 7 minutes.

Thanks for the help - much appreciated!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0