Jump to content

Filecopy function timeout when using over VPN or WAN


Recommended Posts

I've been writing my first scripts in AutoIT and it really rocks.

One of the scripts has to copy a ~16MB access file from a file server to the local PC. The FileCopy function works great while the user is on the LAN, but I had a guy out West on a VPN connection and the copy would consistently fail.

Google searches found one or two people with the same issue and no seeming resolutions. I did find the ShellFileOperation.au3 file for the _ExplorerCopy and that has solved my problem and got the script working.

My concern is with the unknown value of the timeout with respect to FileCopy. I didn't see any options that I could set to influence that timeout value so I'm concerned about ever using the FileCopy function. For example, say I've got a 50MB file that works great on the LAN, but one of my wireless users on a busy AP only has a Mbps or two of bandwidth and it fails on his system. How can I make a determination of what's too big for the various network circumstances I can find my script running in. The FileCopy function is easy to use and included in the base functionality so I'd like to use it, but without more information I can't trust it.

Sincerely,

Richard

Link to comment
Share on other sites

As far as I know, there isn't a timeout.

When you start throwing out things like VPN and WAN though, the first thing that comes to my mind, especially for as long as it would take that large of a file to transfer, is if the integrity of the connection is being maintained consistently. FileCopy will surely error out if it tries to copy some bits and fails to do so because the internet connection dropped momentarily.

Link to comment
Share on other sites

As far as I know, there isn't a timeout.

When you start throwing out things like VPN and WAN though, the first thing that comes to my mind, especially for as long as it would take that large of a file to transfer, is if the integrity of the connection is being maintained consistently. FileCopy will surely error out if it tries to copy some bits and fails to do so because the internet connection dropped momentarily.

I really don't see that as being the problem since I was able to stay VNC'd to the remote computer while testing all of this. The 16MB file copy takes about two minutes to complete if I use drag and drop in a Windows Explorer or the _ExplorerCopy function. Also the _ExplorerCopy function works consistently. So to sum it up, I can consistently copy the file using methods internal or external to AutoIT other than the AutoIT FileCopy function, which fails consistently with the remote user but consistently works in the LAN environment. It's got to be a timeout of some sort or some other condition that the function encounters when the user is remote on a low bandwidth connection.

Link to comment
Share on other sites

  • 2 months later...

Did you get an answer to this? If not, I would advise you to optimize your MTU settings while connected to the network you are going to use VPN across (but not while connected). Could save you some headaches...use TCPOptimizer (google it).

Seriously, may not be your code at all - VPN clients like a specific window size, but all the nodes between you and your termination point can break the way that works and cause timeouts. I had to reviews tons of network traces from users to figure out this was happening, since it can be very different based on where your connecting from.

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...