You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicemix.apache.org by "Ge@@ru (JIRA)" <ji...@apache.org> on 2010/12/09 13:49:02 UTC

[jira] Created: (SMXCOMP-831) Problem on call servicemix-bean service from camel route with concurrent

Problem on call servicemix-bean service from camel route with concurrent
------------------------------------------------------------------------

                 Key: SMXCOMP-831
                 URL: https://issues.apache.org/jira/browse/SMXCOMP-831
             Project: ServiceMix Components
          Issue Type: Bug
          Components: servicemix-camel
    Affects Versions: servicemix-camel-2010.02
            Reporter: Ge@@ru
            Priority: Blocker


I found a problem on use servicemix-camel with servicemix-bean. In
particular, in a scenario like this:
- a cxf-bc that expose a ws and that send exchange to cxf-se service;
- cxf-se service call a servicemix-camel route1;
- servicemix-camel route1 call a camel route2 (to jbi component)
- servicemix-camel route2 call a servicemix bean service (with a thread
sleep inside);
- a second client call cxf-bc service when first client wait for
response;
- and at this point last camel route that wait for a reply from
servicemix-bean service became broken yet after when servicemix-bean
close exchange correctly.

With debug i see that exchange is sent to smx-bean service (in state
Active) and answer is returned by always with state Active, it seems
that exchange don't change to Done and it is handled correctly by servicemix-camel module.

This problem happens only when there are 2 route camel and second route
call smx-bean, while, if i try to call directly smx-bean from first
camel route all works fine.

I add a smx-bean before second camel route by problem is always present.

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


[jira] Commented: (SMXCOMP-831) Problem on call servicemix-bean service from camel route with concurrent requests

Posted by "Ge@@ru (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SMXCOMP-831?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12970144#action_12970144 ] 

Ge@@ru commented on SMXCOMP-831:
--------------------------------

I append exception returned when i stop servicemix for pending exchange:
 Exception occurred during onCompletion. This exception will be ignored.
org.apache.servicemix.nmr.core.ChannelClosedException
	at org.apache.servicemix.nmr.core.ChannelImpl.dispatch(ChannelImpl.java:268)[78:org.apache.servicemix.nmr.core:1.3.0.tilab]
	at org.apache.servicemix.nmr.core.ChannelImpl.send(ChannelImpl.java:117)[78:org.apache.servicemix.nmr.core:1.3.0.tilab]
	at org.apache.servicemix.jbi.runtime.impl.DeliveryChannelImpl.send(DeliveryChannelImpl.java:178)[90:org.apache.servicemix.jbi.runtime:1.3.0.tilab]
	at org.apache.servicemix.common.EndpointDeliveryChannel.send(EndpointDeliveryChannel.java:89)[89:servicemix-common:2010.02.0.tilab]
	at org.apache.servicemix.common.endpoints.SimpleEndpoint.send(SimpleEndpoint.java:70)[89:servicemix-common:2010.02.0.tilab]
	at org.apache.servicemix.camel.CamelProviderEndpoint.doSend(CamelProviderEndpoint.java:139)[151:servicemix-camel:2010.02.0.tilab]
	at org.apache.servicemix.camel.CamelProviderEndpoint.onFailure(CamelProviderEndpoint.java:165)[151:servicemix-camel:2010.02.0.tilab]
	at org.apache.camel.impl.DefaultUnitOfWork.done(DefaultUnitOfWork.java:173)[66:org.apache.camel.camel-core:2.4.0]
	at org.apache.camel.processor.UnitOfWorkProcessor.doneUow(UnitOfWorkProcessor.java:121)[66:org.apache.camel.camel-core:2.4.0]
	at org.apache.camel.processor.UnitOfWorkProcessor.access$000(UnitOfWorkProcessor.java:36)[66:org.apache.camel.camel-core:2.4.0]
	at org.apache.camel.processor.UnitOfWorkProcessor$1.done(UnitOfWorkProcessor.java:106)[66:org.apache.camel.camel-core:2.4.0]
	at org.apache.camel.processor.Pipeline.process(Pipeline.java:130)[66:org.apache.camel.camel-core:2.4.0]
	at org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:99)[66:org.apache.camel.camel-core:2.4.0]
	at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[66:org.apache.camel.camel-core:2.4.0]
	at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[66:org.apache.camel.camel-core:2.4.0]
	at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[66:org.apache.camel.camel-core:2.4.0]
	at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:68)[66:org.apache.camel.camel-core:2.4.0]
	at org.apache.servicemix.camel.CamelProviderEndpoint$1.call(CamelProviderEndpoint.java:109)[151:servicemix-camel:2010.02.0.tilab]
	at org.apache.servicemix.camel.JbiBinding.runWithCamelContextClassLoader(JbiBinding.java:116)[151:servicemix-camel:2010.02.0.tilab]
	at org.apache.servicemix.camel.CamelProviderEndpoint.handleActiveProviderExchange(CamelProviderEndpoint.java:107)[151:servicemix-camel:2010.02.0.tilab]
	at org.apache.servicemix.camel.CamelProviderEndpoint.process(CamelProviderEndpoint.java:85)[151:servicemix-camel:2010.02.0.tilab]
	at org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:618)[89:servicemix-common:2010.02.0.tilab]
	at org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:573)[89:servicemix-common:2010.02.0.tilab]
	at org.apache.servicemix.common.AsyncBaseLifeCycle.processExchangeInTx(AsyncBaseLifeCycle.java:470)[89:servicemix-common:2010.02.0.tilab]
	at org.apache.servicemix.common.AsyncBaseLifeCycle$2.run(AsyncBaseLifeCycle.java:348)[89:servicemix-common:2010.02.0.tilab]
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_22]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_22]
	at java.lang.Thread.run(Thread.java:662)[:1.6.0_22]


> Problem on call servicemix-bean service from camel route with concurrent requests
> ---------------------------------------------------------------------------------
>
>                 Key: SMXCOMP-831
>                 URL: https://issues.apache.org/jira/browse/SMXCOMP-831
>             Project: ServiceMix Components
>          Issue Type: Bug
>          Components: servicemix-camel
>    Affects Versions: servicemix-camel-2010.02
>            Reporter: Ge@@ru
>            Priority: Blocker
>         Attachments: test_route.tar.bz2
>
>
> I found a problem on use servicemix-camel with servicemix-bean. In
> particular, in a scenario like this:
> - a cxf-bc that expose a ws and that send exchange to cxf-se service;
> - cxf-se service call a servicemix-camel route1;
> - servicemix-camel route1 call a camel route2 (to jbi component)
> - servicemix-camel route2 call a servicemix bean service (with a thread
> sleep inside);
> - a second client call cxf-bc service when first client wait for
> response;
> - and at this point last camel route that wait for a reply from
> servicemix-bean service became broken yet after when servicemix-bean
> close exchange correctly.
> With debug i see that exchange is sent to smx-bean service (in state
> Active) and answer is returned by always with state Active, it seems
> that exchange don't change to Done and it is handled correctly by servicemix-camel module.
> This problem happens only when there are 2 route camel and second route
> call smx-bean, while, if i try to call directly smx-bean from first
> camel route all works fine.
> I add a smx-bean before second camel route by problem is always present.

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


[jira] Updated: (SMXCOMP-831) Problem on call servicemix-bean service from camel route with concurrent requests

Posted by "Ge@@ru (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SMXCOMP-831?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ge@@ru updated SMXCOMP-831:
---------------------------

    Summary: Problem on call servicemix-bean service from camel route with concurrent requests  (was: Problem on call servicemix-bean service from camel route with concurrent)

> Problem on call servicemix-bean service from camel route with concurrent requests
> ---------------------------------------------------------------------------------
>
>                 Key: SMXCOMP-831
>                 URL: https://issues.apache.org/jira/browse/SMXCOMP-831
>             Project: ServiceMix Components
>          Issue Type: Bug
>          Components: servicemix-camel
>    Affects Versions: servicemix-camel-2010.02
>            Reporter: Ge@@ru
>            Priority: Blocker
>
> I found a problem on use servicemix-camel with servicemix-bean. In
> particular, in a scenario like this:
> - a cxf-bc that expose a ws and that send exchange to cxf-se service;
> - cxf-se service call a servicemix-camel route1;
> - servicemix-camel route1 call a camel route2 (to jbi component)
> - servicemix-camel route2 call a servicemix bean service (with a thread
> sleep inside);
> - a second client call cxf-bc service when first client wait for
> response;
> - and at this point last camel route that wait for a reply from
> servicemix-bean service became broken yet after when servicemix-bean
> close exchange correctly.
> With debug i see that exchange is sent to smx-bean service (in state
> Active) and answer is returned by always with state Active, it seems
> that exchange don't change to Done and it is handled correctly by servicemix-camel module.
> This problem happens only when there are 2 route camel and second route
> call smx-bean, while, if i try to call directly smx-bean from first
> camel route all works fine.
> I add a smx-bean before second camel route by problem is always present.

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


[jira] Commented: (SMXCOMP-831) Problem on call servicemix-bean service from camel route with concurrent requests

Posted by "Ge@@ru (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SMXCOMP-831?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12969751#action_12969751 ] 

Ge@@ru commented on SMXCOMP-831:
--------------------------------

I increase size of threads pool and use a final ProducerTemplate and now it works. But what happens when i arrived to max size pool.
Probably it is needed always use async mode to limit this problem. But, is there a way to avoid broken of the route and create an exception, so with a retry i can accomplish my task without broken all my services?

> Problem on call servicemix-bean service from camel route with concurrent requests
> ---------------------------------------------------------------------------------
>
>                 Key: SMXCOMP-831
>                 URL: https://issues.apache.org/jira/browse/SMXCOMP-831
>             Project: ServiceMix Components
>          Issue Type: Bug
>          Components: servicemix-camel
>    Affects Versions: servicemix-camel-2010.02
>            Reporter: Ge@@ru
>            Priority: Blocker
>         Attachments: test_route.tar.bz2
>
>
> I found a problem on use servicemix-camel with servicemix-bean. In
> particular, in a scenario like this:
> - a cxf-bc that expose a ws and that send exchange to cxf-se service;
> - cxf-se service call a servicemix-camel route1;
> - servicemix-camel route1 call a camel route2 (to jbi component)
> - servicemix-camel route2 call a servicemix bean service (with a thread
> sleep inside);
> - a second client call cxf-bc service when first client wait for
> response;
> - and at this point last camel route that wait for a reply from
> servicemix-bean service became broken yet after when servicemix-bean
> close exchange correctly.
> With debug i see that exchange is sent to smx-bean service (in state
> Active) and answer is returned by always with state Active, it seems
> that exchange don't change to Done and it is handled correctly by servicemix-camel module.
> This problem happens only when there are 2 route camel and second route
> call smx-bean, while, if i try to call directly smx-bean from first
> camel route all works fine.
> I add a smx-bean before second camel route by problem is always present.

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


[jira] Commented: (SMXCOMP-831) Problem on call servicemix-bean service from camel route with concurrent requests

Posted by "Gert Vanthienen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SMXCOMP-831?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12969734#action_12969734 ] 

Gert Vanthienen commented on SMXCOMP-831:
-----------------------------------------

On my machine, this is fixed by:
# increasing the core thread pool size to 32 in {{etc/org.apache.servicemix.jbi.cfg}}
# adding a missing {{client.done(exchange)}} after the {{client.sendSync(exchange)}} in {{TestRouteImpl.java}}
# creating a single producer template in the constructor of the {{CallerBean}} classes and reusing that instead of recreating the template all the time

I'm not even sure that #3 is necessary, it's probably the combination of the MEP violation in #2, synchronous sends and a small core pool size that causes the problem.

> Problem on call servicemix-bean service from camel route with concurrent requests
> ---------------------------------------------------------------------------------
>
>                 Key: SMXCOMP-831
>                 URL: https://issues.apache.org/jira/browse/SMXCOMP-831
>             Project: ServiceMix Components
>          Issue Type: Bug
>          Components: servicemix-camel
>    Affects Versions: servicemix-camel-2010.02
>            Reporter: Ge@@ru
>            Priority: Blocker
>         Attachments: test_route.tar.bz2
>
>
> I found a problem on use servicemix-camel with servicemix-bean. In
> particular, in a scenario like this:
> - a cxf-bc that expose a ws and that send exchange to cxf-se service;
> - cxf-se service call a servicemix-camel route1;
> - servicemix-camel route1 call a camel route2 (to jbi component)
> - servicemix-camel route2 call a servicemix bean service (with a thread
> sleep inside);
> - a second client call cxf-bc service when first client wait for
> response;
> - and at this point last camel route that wait for a reply from
> servicemix-bean service became broken yet after when servicemix-bean
> close exchange correctly.
> With debug i see that exchange is sent to smx-bean service (in state
> Active) and answer is returned by always with state Active, it seems
> that exchange don't change to Done and it is handled correctly by servicemix-camel module.
> This problem happens only when there are 2 route camel and second route
> call smx-bean, while, if i try to call directly smx-bean from first
> camel route all works fine.
> I add a smx-bean before second camel route by problem is always present.

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


[jira] Updated: (SMXCOMP-831) Problem on call servicemix-bean service from camel route with concurrent requests

Posted by "Ge@@ru (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SMXCOMP-831?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ge@@ru updated SMXCOMP-831:
---------------------------

    Attachment: test_route.tar.bz2

In webservice on example is called from two client at same time, service became broken.

> Problem on call servicemix-bean service from camel route with concurrent requests
> ---------------------------------------------------------------------------------
>
>                 Key: SMXCOMP-831
>                 URL: https://issues.apache.org/jira/browse/SMXCOMP-831
>             Project: ServiceMix Components
>          Issue Type: Bug
>          Components: servicemix-camel
>    Affects Versions: servicemix-camel-2010.02
>            Reporter: Ge@@ru
>            Priority: Blocker
>         Attachments: test_route.tar.bz2
>
>
> I found a problem on use servicemix-camel with servicemix-bean. In
> particular, in a scenario like this:
> - a cxf-bc that expose a ws and that send exchange to cxf-se service;
> - cxf-se service call a servicemix-camel route1;
> - servicemix-camel route1 call a camel route2 (to jbi component)
> - servicemix-camel route2 call a servicemix bean service (with a thread
> sleep inside);
> - a second client call cxf-bc service when first client wait for
> response;
> - and at this point last camel route that wait for a reply from
> servicemix-bean service became broken yet after when servicemix-bean
> close exchange correctly.
> With debug i see that exchange is sent to smx-bean service (in state
> Active) and answer is returned by always with state Active, it seems
> that exchange don't change to Done and it is handled correctly by servicemix-camel module.
> This problem happens only when there are 2 route camel and second route
> call smx-bean, while, if i try to call directly smx-bean from first
> camel route all works fine.
> I add a smx-bean before second camel route by problem is always present.

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


[jira] Issue Comment Edited: (SMXCOMP-831) Problem on call servicemix-bean service from camel route with concurrent requests

Posted by "Ge@@ru (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SMXCOMP-831?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12969718#action_12969718 ] 

Ge@@ru edited comment on SMXCOMP-831 at 12/9/10 7:51 AM:
---------------------------------------------------------

If webservice on example is called from two client at same time, service became broken.

      was (Author: geaaru):
    In webservice on example is called from two client at same time, service became broken.
  
> Problem on call servicemix-bean service from camel route with concurrent requests
> ---------------------------------------------------------------------------------
>
>                 Key: SMXCOMP-831
>                 URL: https://issues.apache.org/jira/browse/SMXCOMP-831
>             Project: ServiceMix Components
>          Issue Type: Bug
>          Components: servicemix-camel
>    Affects Versions: servicemix-camel-2010.02
>            Reporter: Ge@@ru
>            Priority: Blocker
>         Attachments: test_route.tar.bz2
>
>
> I found a problem on use servicemix-camel with servicemix-bean. In
> particular, in a scenario like this:
> - a cxf-bc that expose a ws and that send exchange to cxf-se service;
> - cxf-se service call a servicemix-camel route1;
> - servicemix-camel route1 call a camel route2 (to jbi component)
> - servicemix-camel route2 call a servicemix bean service (with a thread
> sleep inside);
> - a second client call cxf-bc service when first client wait for
> response;
> - and at this point last camel route that wait for a reply from
> servicemix-bean service became broken yet after when servicemix-bean
> close exchange correctly.
> With debug i see that exchange is sent to smx-bean service (in state
> Active) and answer is returned by always with state Active, it seems
> that exchange don't change to Done and it is handled correctly by servicemix-camel module.
> This problem happens only when there are 2 route camel and second route
> call smx-bean, while, if i try to call directly smx-bean from first
> camel route all works fine.
> I add a smx-bean before second camel route by problem is always present.

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


[jira] Commented: (SMXCOMP-831) Problem on call servicemix-bean service from camel route with concurrent requests

Posted by "Ge@@ru (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SMXCOMP-831?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12970143#action_12970143 ] 

Ge@@ru commented on SMXCOMP-831:
--------------------------------

I do another test where instead of use smx-bean and smx-camel components i used only smx-bean components with only 2 threads for pool and i see that requests are enqueue correctly and handled yet if there are few threads available.
While, with smx-camel this doesn't work. So I confirm that there is a bug on use correctly unqueue of the requests when there are more request of the threads pool size. 
Increase size of the pool is a workaround and not a final solution that it works like for smx-bean.

> Problem on call servicemix-bean service from camel route with concurrent requests
> ---------------------------------------------------------------------------------
>
>                 Key: SMXCOMP-831
>                 URL: https://issues.apache.org/jira/browse/SMXCOMP-831
>             Project: ServiceMix Components
>          Issue Type: Bug
>          Components: servicemix-camel
>    Affects Versions: servicemix-camel-2010.02
>            Reporter: Ge@@ru
>            Priority: Blocker
>         Attachments: test_route.tar.bz2
>
>
> I found a problem on use servicemix-camel with servicemix-bean. In
> particular, in a scenario like this:
> - a cxf-bc that expose a ws and that send exchange to cxf-se service;
> - cxf-se service call a servicemix-camel route1;
> - servicemix-camel route1 call a camel route2 (to jbi component)
> - servicemix-camel route2 call a servicemix bean service (with a thread
> sleep inside);
> - a second client call cxf-bc service when first client wait for
> response;
> - and at this point last camel route that wait for a reply from
> servicemix-bean service became broken yet after when servicemix-bean
> close exchange correctly.
> With debug i see that exchange is sent to smx-bean service (in state
> Active) and answer is returned by always with state Active, it seems
> that exchange don't change to Done and it is handled correctly by servicemix-camel module.
> This problem happens only when there are 2 route camel and second route
> call smx-bean, while, if i try to call directly smx-bean from first
> camel route all works fine.
> I add a smx-bean before second camel route by problem is always present.

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