etch-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject RE: Connection Timeout
Date Mon, 11 Feb 2013 12:09:54 GMT

unfortunately we are still using c-binding, which doesn't seem to support "@Timeout". Attached
you can find an attempt to address the issue (thanks to Martin Veith for some valuable advise).

Having the property "etch.tcpconnection.timeout.send" set, send-calls return after the specified
time interval and the result can be evaluated like in this example:

    if (is_etch_exception(result))
        UInt32 errorcode = etch_exception_get_errorcode((etch_exception*)result);
        if (errorcode == ETCH_EIO)
            remote_base->stop_waitdown(remote_base, 1000);

What do you think?


-----Urspr√ľngliche Nachricht-----
Von: scott comer [] 
Gesendet: Freitag, 7. Dezember 2012 16:58
Betreff: Re: Connection Timeout

which binding(s) are you using?

java and c# implement these:

there's a way to allow the caller to only wait a certain amount of time
for a response, which is @Timeout(n) marks on a method (or interface).

this causes the caller to abandon the call but doesn't kill the connection.

adding term filter=KeepAlive to a connection url will cause a hung
connection to be detected and killed. it must be added to the urls of
both client and server.

for a connection to hang means that one of the message readers has hung
or is just super busy. one way this can happen is for a message reader
to make an etch call. you must take steps to prevent this from
happening. one way is to mark the method as being as asynchronous (which
causes it to be executed on a thread pool instead of by the reader).

scott out

On 12/7/2012 6:31 AM, wrote:
> Hi,
> currently we have the problem that the client sometimes doesn't read data of an etch
call for a long time. This blocks the calling server (in apr_socket_send()), in our case it
leads to a reset as the server fails to call the watchdog for that time.
> My question is: can I initialize an etch connection with a timeout for all etch calls?
> Further, when the timeout gets reached, I want to be able to terminate the etch connection.
> Is this already possible? If so, how does it work?
> Thanks,
> Harald

  • Unnamed multipart/mixed (inline, None, 0 bytes)
View raw message