You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Michal <ca...@yahoo.com> on 2008/05/30 18:26:28 UTC

http endpoint issues

I have found following issues in http endpoint:

* http provider has no timeout - can it be addressed in some how?
* http consumer has fixed 60 second timeout - it can be changed via
httpconfiguration (f.e. via jmx) but only globally - not specifically for
each endpoint
* http consumer (https) has a memory leak. Below steps to simulate this
leak:

- send message via http client to http consumer (it must be https)
- http consumer send message to a bean endpoint
- process message for longer time than the timeout (f.e. 65 sec)
- timeout response is sent to the http client
- bean enpoint works normally and sends response to the http endpoint (via
channel)
- http consumer stores response in exchanges map (in method
ConsumerProcessor.process(MessageExchange) - since no one will pick it up
then we will have memory leak here


I think it is a high time to look for a different esb vendor. All this jbi
complexity (send message, acknowledge message) is just a very good
opportunity to have leaks like above. Next, jbi forces to have xml messages
- and most servicemix endpoints will fail (f.e. http endpoint) in case of
different payload. Last but not least servicemix is just wrapping many
technologies which at first seems to be a very good idea cause it might hide
its complexities but as soon as there is a need to have some more advance
features and take the controll over it then .... you would need to write
your own component cause SM components are not flexible enough.




-- 
View this message in context: http://www.nabble.com/http-endpoint-issues-tp17562872p17562872.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: http endpoint issues

Posted by Guillaume Nodet <gn...@gmail.com>.
I've raised and fix both issues:
  http://issues.apache.org/activemq/browse/SM-1407
  http://issues.apache.org/activemq/browse/SM-1408

On Tue, Jun 17, 2008 at 11:20 AM, Guillaume Nodet <gn...@gmail.com> wrote:
> I'm working on this issue right now.
> Did you raise any issue for this problem ?
>
> On Sun, Jun 1, 2008 at 7:57 PM, Michal <ca...@yahoo.com> wrote:
>>
>> I have just spotted that this memory leak can be fixed by changing below
>> lines (in ConsumerProcessor)
>>
>>                    boolean result = cont.suspend(suspentionTime);
>>                    exchange = exchanges.remove(exchange.getExchangeId());
>>                    if (!result) {
>>                        throw new Exception("Error sending exchange:
>> aborted");
>>                    }
>>
>> to
>>                    boolean result = cont.suspend(suspentionTime);
>>                    exchange = exchanges.remove(exchange.getExchangeId());
>>                    if (!result) {
>>                        locks.remove(exchange.getExchangeId());
>>                        throw new Exception("Error sending exchange:
>> aborted");
>>                    }
>>
>> locks map needs to be cleaned up (this is exactly done ine http:consumer).
>> Well, actually IMO method
>> org.apache.servicemix.http.processors.ConsumerProcessor.process(MessageExchange)
>> is not thread safe: continuation could be obtained there but when the method
>> enters synchronized block timeout could occur - so when exchanges map is
>> filled no one will pick it up.
>>
>> --
>> View this message in context: http://www.nabble.com/http-endpoint-issues-tp17562872p17588264.html
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
>>
>
>
>
> --
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
>



-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/

Re: http endpoint issues

Posted by Guillaume Nodet <gn...@gmail.com>.
I'm working on this issue right now.
Did you raise any issue for this problem ?

On Sun, Jun 1, 2008 at 7:57 PM, Michal <ca...@yahoo.com> wrote:
>
> I have just spotted that this memory leak can be fixed by changing below
> lines (in ConsumerProcessor)
>
>                    boolean result = cont.suspend(suspentionTime);
>                    exchange = exchanges.remove(exchange.getExchangeId());
>                    if (!result) {
>                        throw new Exception("Error sending exchange:
> aborted");
>                    }
>
> to
>                    boolean result = cont.suspend(suspentionTime);
>                    exchange = exchanges.remove(exchange.getExchangeId());
>                    if (!result) {
>                        locks.remove(exchange.getExchangeId());
>                        throw new Exception("Error sending exchange:
> aborted");
>                    }
>
> locks map needs to be cleaned up (this is exactly done ine http:consumer).
> Well, actually IMO method
> org.apache.servicemix.http.processors.ConsumerProcessor.process(MessageExchange)
> is not thread safe: continuation could be obtained there but when the method
> enters synchronized block timeout could occur - so when exchanges map is
> filled no one will pick it up.
>
> --
> View this message in context: http://www.nabble.com/http-endpoint-issues-tp17562872p17588264.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>



-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/

Re: http endpoint issues

Posted by Michal <ca...@yahoo.com>.
I have just spotted that this memory leak can be fixed by changing below
lines (in ConsumerProcessor)

                    boolean result = cont.suspend(suspentionTime);
                    exchange = exchanges.remove(exchange.getExchangeId());
                    if (!result) {
                        throw new Exception("Error sending exchange:
aborted");
                    }

to
                    boolean result = cont.suspend(suspentionTime);
                    exchange = exchanges.remove(exchange.getExchangeId());
                    if (!result) {
                        locks.remove(exchange.getExchangeId());
                        throw new Exception("Error sending exchange:
aborted");
                    }

locks map needs to be cleaned up (this is exactly done ine http:consumer).
Well, actually IMO method
org.apache.servicemix.http.processors.ConsumerProcessor.process(MessageExchange)
is not thread safe: continuation could be obtained there but when the method
enters synchronized block timeout could occur - so when exchanges map is
filled no one will pick it up.

-- 
View this message in context: http://www.nabble.com/http-endpoint-issues-tp17562872p17588264.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.