FTP site login is so slow my script fails

Started by bspies, November 12, 2013, 09:39:24 AM

Previous topic - Next topic

bspies

Hello

We have an automated process that runs in the morning, and since our vendor "upgraded" their FTP server login is so slow it fails our connection.  It appears to take over 30 seconds to connect, and then the function fails.  My question is can I tweak the timeout somehow in winbatch or in Windows itself?

I am using the WWINT44I.DLL extender (44080), Winbatch 2011A. 

I use debug tracing as a normal practice, so here is a snippet of what is happening.  You can tell from the time listed that the connection is about 30 seconds long to make then it gives up.  If I manually use a command line ftp client it does let me logon but it is taking forever to get a response, possibly over 30 seconds.

Code (winbatch) Select
InternetHandle=iBegin( 0, ``, ``)
(186842) VALUE INT => 13369348

FTPHandle=iHostConnect( InternetHandle, ftphost, @FTPPASSIVE , ftp_acct, ftp_pwd )
(217465) VALUE INT => 0

if FTPHandle==0
(217465) IF DO==>TRUE

FileWrite(FileHandle, StrCat(TimeYmdHms(), ` - FAILED FTP Connection to: `,ftphost))
(217465) VALUE INT => 0


Thanks in advance!

P.S. we also have a call into the vendor about their poor FTP server performance, but I have low expectations on them resolving this anytime soon.

bspies

Hello again

I found an answer after posting the above question.  The timeout values can be changed in the extender using iOptionSet.  Hopefully this will help someone else that runs into the same issue someday.

Thanks

Code (winbatch) Select
InternetHandle=iBegin( 0, ``, ``)
;we need to set the connection timeouts to >30 seconds as of Nov 12, 2013 because the ftp server is taking about 35 seconds to logon.  The default timeout is 30 seconds.
iOptionSet(InternetHandle,`control_send_timeout`,600000)
iOptionSet(InternetHandle,`control_receive_timeout`,600000)

Deana

Yes iOptionSet can be used to affect connection timeouts.
Deana F.
Technical Support
Wilson WindowWare Inc.

DAG_P6

Been there, done that, not fun - and thanks for reminding me of a setting to check at a location where we have had continuous stalls for over a month.
David A. Gray
You are more important than any technology.