You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@synapse.apache.org by "Asankha C. Perera" <as...@wso2.com> on 2008/02/27 11:44:19 UTC

[Fwd: Re: network break down doesn't immediately cause Client request failure]

Hi

You posted this same question to user@ mailing list, and I posted my
reply there.. are you subscribed to our lists? else you may be able to
post but you will not see any replies.

So can you please ensure that you are subscribed to the lists

asankha

-------- Original Message --------
Subject: 	Re: network break down doesn't immediately cause Client
request failure
Date: 	Tue, 26 Feb 2008 14:24:58 +0530
From: 	Asankha C. Perera <as...@wso2.com>
Reply-To: 	user@synapse.apache.org
To: 	user@synapse.apache.org
References: 	<00...@IBM0618>



Hi
> When network breakdown(or axisServer shutdown),  org.apache.synapse.transport.nhttp.ClientHandler's corresponding callback handler is invoked (onClose(), or onException(),...) . and the callback only just shutdown the connection.
>
> But the sessionRequestCallback(HttpCoreNIOSender.sessionRequestCallback) registed when establish http connection(ioreactor.connect(...)) will never be called. so the failure response will not be generated and send back to axisClient.
>   
Can you raise an issue on the JIRA so one of us can take a proper look
and ensure that we detect network disconnections and timeouts correctly
> And is there any other things could I do to avoid this situation?
>   
You can use the timeout property for endpoints
(http://synapse.apache.org/Synapse_Configuration_Language.html#address-endpoint)
to overcome this
/" Address endpoints can timeout if responses fail to arrive at Synapse
by a predefined timeout-duration specified in seconds. The timeout
action specifies whether to discard responses that arrives late, or to
trigger a fault. Synapse has a periodic timeout handler that triggers
itself at each 15 second interval. Thus endpoint timeouts will have a
+/- error on actual trigger time. Though this can be minimized by
setting a System property "synapse.timeout_handler_interval" to a
millisecond duration below the desired endpoint timeout, care must be
taken as a lesser value may have a higher overhead on the system."/


asankha



Re: network break down doesn't immediately cause Client request failure]

Posted by "Asankha C. Perera" <as...@wso2.com>.
Hi
> 1)synapse http transports can detected the some network exception immediately ,but it just shutdown connection and do nothing(in ClientHandler.java)
>
> 2)Yes, the synapse http transports does write the code to process the immediately detected exception (HttpCoreNIOSender.sessionRequestCallback).But when I testing by raise exception manually (etc. shutdown axisServer), only ClientHandler catched the io-exception, the SessionRequestCallback will never catch the io-exception.
>
>
> So is it's the fault of synapse-transport? 
> Or Synapselooks it as demand need not to be full-filled?
> And maybe it's fault of http-core-nio
>   
I think the issue is with the Synapse NIO transport code,.. now that the
JIRA is raised, I will look into this as soon as I get some time

asankha

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


Re: Re: network break down doesn't immediately cause Client request failure]

Posted by xuhongbo <xu...@tongtech.com>.
Thanks asankha to correct my mistake of unaware of how to subscribe the mail-list, and avoid the stupid action of re-send same mail;

But using time-out property of endpoint is still cannot solved the situation: the unrecoverable-io-exception has been detected by synapse transport, but the client still must wait for a time(defined in time-out property).

After checking the code, I found these things

1)synapse http transports can detected the some network exception immediately ,but it just shutdown connection and do nothing(in ClientHandler.java)

2)Yes, the synapse http transports does write the code to process the immediately detected exception (HttpCoreNIOSender.sessionRequestCallback).But when I testing by raise exception manually (etc. shutdown axisServer), only ClientHandler catched the io-exception, the SessionRequestCallback will never catch the io-exception.


So is it's the fault of synapse-transport? 
Or Synapselooks it as demand need not to be full-filled?
And maybe it's fault of http-core-nio



----- Original Message ----- 
From: Asankha C. Perera 
To: dev@synapse.apache.org ; xuhb@tongtech.com 
Sent: Wednesday, February 27, 2008 6:44 PM
Subject: [Fwd: Re: network break down doesn't immediately cause Client request failure]


Hi

You posted this same question to user@ mailing list, and I posted my reply there.. are you subscribed to our lists? else you may be able to post but you will not see any replies. 

So can you please ensure that you are subscribed to the lists

asankha