Error getting tags :
error 404Error getting tags :
error 404 libURLSetFTPStopTime | revDocs | RunRev
Welcome Guest (Log in)
Product Edition
Version
libURLSetFTPStopTime
Basics
Expander triangle
Type
Command
Syntax
libURLSetFTPStopTime timeoutInSeconds
Introduced
1.1.1
Environment
Desktop, Web and Server
Platform Support
MacOS,Mac OS X,Windows,Linux
Security
Network
Summary
Sets the timeout value for FTP transfers.
Examples

libURLSetFTPStopTime 30 -- 30-second timeout
libURLSetFTPStopTime field "Timeout Value"

Additional Comments
Expander triangle

Use the libURLSetFTPStopTime command to increase the efficiency of multiple FTP transfers.

Parameters:

The timeoutInSeconds is a non-negative integer, or an expression that evaluates to a non-negative integer.

Comments:

When Revolution opens a socket to a host in order to upload or download a file via ftp, or to delete a file, it leaves the connection open for a time after the transaction completes. If another file is requested from the same FTP server during that time, Revolution uses the same socket instead of opening another one. This saves time if you are transferring multiple files with the same server, since the socket does not need to be set up again for each file.

By default, the timeout value is 15 seconds.

Note: If the server closes the connection, Revolution does not attempt to keep it open. The timeout set by libURLSetFTPStopTime controls when Revolution closes the connection from its end, but if the server closes the connection, a longer timeout has no effect.

Important! The libURLSetFTPStopTimecommand is part of the Internet library. To ensure that the command works in a standalone application, you must include this custom library when you create your standalone. In the Inclusions section of the Standalone Application Settings window, make sure "Internet Library" is selected in the list of script libraries.

Note: When included in a standalone application, the Internet library is implemented as a hidden group and made available when the group receives its first openBackground message. During the first part of the application's startup process, before this message is sent, the libURLSetFTPStopTimecommand is not yet available. This may affect attempts to use this command in startup, preOpenStack, openStack, or preOpenCardhandlers in the main stack. Once the application has finished starting up, the library is available and the libURLSetFTPStopTimecommand can be used in any handler.

User Comments
Expander triangle
User thumbnail
Ray Bennett
StarStarStarStarStar
Feb 6, 2011
It appears that when using libURLftpUploadFile for consecutive file uploads to an on-rev server, Revolution will NOT re-use an already open socket, but instead creates another. What that means is that when you are doing consecutive file transfers having the client side timeout set too high (this command is setting the client side timeout) is actually detrimental, as you can exceed the number of connections allowed from one IP fairly quickly.
I've found that setting the timeout to 5 seems to make the most efficient use of the connections (if you watch the sessions open and unload from the cPanel you rarely get more than two sessions open at once this way). If you set it to 30, the most common number of sessions seems to be around 4 or 5. If you set it higher, it quickly climbs past 6 and will soon start to throw 'too many sessions from this IP' errors.