Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Please help.......Retry the FTP or HTTP using the PUT/GET command?

Status
Not open for further replies.

jasminemerc

IS-IT--Management
Jun 14, 2004
9
US
Hi,
I am trying to FTPing some data using the PUT command. Can I have the retry option for this. That is, if the FTP fails then retry for n number of times every m seconds. I know that we can do it by calling another map and having the the output card that FTPs as -OAFTP1R5:2....., which retrys to FTP the data(in case of failure) for 5 times every 2 seconds but is they a way to specify this retry command with PUT function.
I really appreaciate if i could get some help on this.
 
No. PUT doesn't support retries. Use a RUN map instead. You will also gain some error handling, since PUT and GET have almost none.

Most of the time FTP retries don't work either. Usually FTP problems are not so transient that trying again in seconds would fix it. Best bet is to find out what is causing the problem and fixing that.

IF there is a problem with the FTP (using a VALID/FAIL) around the RUN staement, you could have a map process the main map's audit log, and then call another version of the main map with a card that would hold the map for more than the IdleFTP setting. At least this way you can try on another connection.



BocaBurger
<===========================||////////////////|0
The pen is mightier than the sword, but the sword hurts more!
 
Answer is no, PUT doesn't work that way. best to use the RUN map option. You also gain error handling if implemented properly.

However, most FTP problems would not be solved in the 2 seconds you specified in the retry. I would use one retry but with a time longer than the IdleFTP setting in the .ini file.



BocaBurger
<===========================||////////////////|0
The pen is mightier than the sword, but the sword hurts more!
 
Just to clarify,

"most FTP problems would not be solved in the 2 seconds you specified in the retry"

You want the FTP connection to time out before retrying otherwise you just reuse an existing connection. So, if your ftp failed due to a bad connection your FTPs should continue to fail until that connection times out.

If you go the route described above you'll want to play with the .ini settings... Two high, can cause FTP's to que up and/or increase frequency of FTP failures, too low timeouts could cause FTP failures as well.

I'd start by setting my idle time lower than my retry time.

We've had good luck with the .ini settings below.

IdleFTP=1
;SLimFTP=0
HLimFTP=10 ; High/Hard limit for concurrent FTP connections
;KeepFTP=0
;MinFTP=0

eyetry
 
Based on my experience, you might want one retry after 10 seconds (just in case network or server was busy). Idle FTP should be set to a value to allow conections to be re-used when the load is high, so that you don't have to re-establish a connection when it is still good. If you have FTP maps running so often that you need IdleFTP set to 1, you should be looking for another solution.
HLIM is NOT for concurrent connection to the same server, but a limit for all FTP connections. If set to low, you will have a lot of maps in resource pending, and thus consuming RAM.
There are other causes of FTP timeouts depending on map design and the size of the data or the speed of the servers or network.



BocaBurger
<===========================||////////////////|0
The pen is mightier than the sword, but the sword hurts more!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top