Jump to content

FTP Idle Connections


Recommended Posts

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?

Link to comment
Share on other sites

  • Developers

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

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
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?

Link to comment
Share on other sites

  • Developers

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

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
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!

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...