Uploaded image for project: 'FUSE ESB'
  1. FUSE ESB
  2. ESB-1397

HTTP Consumer timeout handling is incorrect

    Details

      Description

      I'm still getting:

      2011-02-09 04:44:15,353 [pool-flow.seda.servicemix-eip-thread-247] ERROR org.apache.servicemix.http.HttpComponent - 
      Error processing exchange InOut[id: ID:10.209.8.87-12e099f306b-6:82790
      status: Active
      role: consumer
      service: {https://webservices.mycompany.com/websvc}ConsumerStaticRoutingSlipService
      endpoint: sws
      in: (...)
      out: <?xml version="1.0" encoding="UTF-8"?><soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">...
      ]
      java.lang.Exception: HTTP request has timed out for exchange: ID:10.209.8.87-12e099f306b-6:82790
      at org.apache.servicemix.http.endpoints.HttpConsumerEndpoint.process(HttpConsumerEndpoint.java:251)
      at org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:617)
      at org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:588)
      at org.apache.servicemix.common.AsyncBaseLifeCycle.onMessageExchange(AsyncBaseLifeCycle.java:525)
      at org.apache.servicemix.common.SyncLifeCycleWrapper.onMessageExchange(SyncLifeCycleWrapper.java:60)
      at org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:632)
      at org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:185)
      at org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:168)
      at org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      at java.lang.Thread.run(Thread.java:619)
      2011-02-09 04:44:15,354 [pool-flow.seda.servicemix-eip-thread-247] ERROR org.apache.servicemix.http.HttpComponent - 
      Error setting exchange status to ERROR 7-12e099f306b-6:82790
      at org.apache.servicemix.jbi.messaging.MessageExchangeImpl.setError(MessageExchangeImpl.java:264)
      at org.apache.servicemix.common.AsyncBaseLifeCycle.onMessageExchange(AsyncBaseLifeCycle.java:540)
      at org.apache.servicemix.common.SyncLifeCycleWrapper.onMessageExchange(SyncLifeCycleWrapper.java:60)
      at org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:632)
      at org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:185)
      at org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:168)
      at org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      at java.lang.Thread.run(Thread.java:619)
      Caused by: java.lang.Exception: HTTP request has timed out for exchange: ID:10.209.8.87-12e099f306b-6:82790
      at org.apache.servicemix.http.endpoints.HttpConsumerEndpoint.process(HttpConsumerEndpoint.java:251)
      at org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:617)
      at org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:588)
      at org.apache.servicemix.common.AsyncBaseLifeCycle.onMessageExchange(AsyncBaseLifeCycle.java:525)
      ... 8 more

      There are several issues relating to HTTP consumer timeout handling.

      In a nutshell:

      • there was no synchronization where continuation were already resumed() and process(request,respone) was invoked for the second time.
      • there exceptions thrown in process(exchange) method are misleading.
      • They really mean that we has received a late response from the JBI bus, but the response with a timeout has been already sent to the client.
      • The test ConsumerEndpointTest.xtestHttpInOutUnderLoad can be uncommented now, because it passes all the time now.

      Attached is a patch based on servicemix-http-2010.02.0-fuse-00-00.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                gertv Gert Vanthienen
                Reporter:
                joe.luo Joe Luo
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: