HowTo increase FTP-Open timeout (ehost error)

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

HowTo increase FTP-Open timeout (ehost error)

Sean Hinde-2
Hi,

> I'm using the FTP-Module to open 32 ftp conections with 32
> mobiles. Sometimes I see an "ehost" error when I try to open
> a connection. The problem is that it takes sometimes more
> than 60secs to open a connection.
>
> Does somebody know how to increase the timer for this ehost-error?

The short answer is that it is not possible. It appears to be hard coded as

-define(OPEN_TIMEOUT,60*1000). in ftp.erl

This is used directly in the gen_tcp:connect/4 call so it is not
configurable at runtime.

Your options are:

* Change the -define and recompile

* Modify ftp.erl to make it a configureable parameter..

* Ask Ericsson to change it in the next patch release.

If you fancy having a go at making it configurable you always have the
option to send it to erlang-maintainers requesting that they
include your changes.

Rgds,
Sean




NOTICE AND DISCLAIMER:
This email (including attachments) is confidential.  If you have received
this email in error please notify the sender immediately and delete this
email from your system without copying or disseminating it or placing any
reliance upon its contents.  We cannot accept liability for any breaches of
confidence arising through use of email.  Any opinions expressed in this
email (including attachments) are those of the author and do not necessarily
reflect our opinions.  We will not accept responsibility for any commitments
made by our employees outside the scope of our business.  We do not warrant
the accuracy or completeness of such information.



Reply | Threaded
Open this post in threaded view
|

HowTo recompile erlang source code?

Nico Weling
Hi Sean,

thanks for your fast reply!

I've changed the ftp.erl file that was very easy, but how do I recompile the
Erlang source code?

Is ./Install in erl_root_directory enough? It seems me not.

> Your options are:
>
> * Change the -define and recompile
>


Reply | Threaded
Open this post in threaded view
|

HowTo increase FTP-Open timeout (ehost error)

Per Hedeland-4
In reply to this post by Sean Hinde-2
Sean Hinde <Sean.Hinde> wrote:

>
>> I'm using the FTP-Module to open 32 ftp conections with 32
>> mobiles. Sometimes I see an "ehost" error when I try to open
>> a connection. The problem is that it takes sometimes more
>> than 60secs to open a connection.
>>
>> Does somebody know how to increase the timer for this ehost-error?
>
>The short answer is that it is not possible. It appears to be hard coded as
>
>-define(OPEN_TIMEOUT,60*1000). in ftp.erl
>
>This is used directly in the gen_tcp:connect/4 call so it is not
>configurable at runtime.
>
>Your options are:
>
>* Change the -define and recompile
>
>* Modify ftp.erl to make it a configureable parameter..
>
>* Ask Ericsson to change it in the next patch release.

It may be the case that neither of those will help a whole lot though -
the TCP/IP stack in the kernel of most OSes will impose its own timeout
on TCP connection attempts, and changing the argument to
gen_tcp:connect() can't *raise* that timeout. A typical value on Unices
is ~ 75 seconds, which (like the 60 seconds of ftp.erl) is very
"generous" for "normal" situations, but not much higher than 60. I think
Nico will need to code for the possibility of connection timeouts and do
explicit retries.

--Per Hedeland
per