synapse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "HongBo Xu (JIRA)" <j...@apache.org>
Subject [jira] Created: (SYNAPSE-247) Network exception caused Synapse-Http-Transport Stop working
Date Wed, 05 Mar 2008 01:25:40 GMT
Network exception caused Synapse-Http-Transport Stop working
------------------------------------------------------------

                 Key: SYNAPSE-247
                 URL: https://issues.apache.org/jira/browse/SYNAPSE-247
             Project: Synapse
          Issue Type: Bug
          Components: Transports
    Affects Versions: 1.1.1
            Reporter: HongBo Xu
            Priority: Critical


Test:
	axisClient-->Synapse--->axisServer(not started)
Appearance: 
	If running synapse in debugging mode, we will see once a axisClient connect to synapse, 
	a new HttpServerWorker-Thread will be created, but never stop, and soon the thread-pool will
be exhaused;
Step:	
	1) axisClient send a request to synapse (the request's content must be large enough( etc
exceed 1024 character))
	2) synapse relay the request from axisClient to a not started axisServer
	3) then synapse will blocked while axis2Req.streamContents(), and the thread will be blocked
	
	
Description:

    /*
    axisReq using a internal Channel to transfer streamed data of axis request to Http underlying
encoder for transport 
    so if the request content is larger than channel's internal buffer, streamMessageContents()
will blocked and 
    waiting the successfully http-connection to read the data from channel.
    */
    Axis2HttpRequest.streamMessageContents(){
        OutputStream out = Channels.newOutputStream(pipe.sink()); //pipe is 
        ...
    }
    ClientHandler.outputReady(...){
    	//read data from channel
    	//write readed data to http-core-nio's underlying encoder
    }
    /*
    But if http-connection failed, ClientHandler's callback cactch it and just shutdown httpConnection
only.
    the streamMessageContents() will blocked for ever
    */
    ClientHandler:
    public void exception(final NHttpClientConnection conn, final IOException e) {
        shutdownConnection(conn);
    }
    HttpCoreNIOSender:
    private void sendAsyncRequest(EndpointReference epr, MessageContext msgContext) throws
AxisFault {
	     ...............
            axis2Req.streamMessageContents(); 
	   ....
    }


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


Mime
View raw message