2 Replies Latest reply on Apr 16, 2014 4:53 AM by Tinie Sluijter

    SwitchYard File input service stops after a while

    Tinie Sluijter Newbie

      We've create a SwitchYard service, with a File input service to handle incoming files.

       

      We defined an input directory, an initial delay of 1000 ms, a delay of 5000 ms an output directory (done) and a failed directory (failed).

      the input service delivers the file to a bean that handles the file.

       

      We test the service by putting a file in the input directory. After it's handled (and moved to the done directory) we put a new file in the input directory.

      On my Windows development machine this process works just fine.

      But on our Linux test machine the process stops after processing a certain amount of files.

      We see a <file>.camellock gets created, but after that noting happens anymore.

       

      If we delete the file and .camellock file, and put a new file in the input directory, nothing happens to that file.

       

      What to do?

        • 1. Re: SwitchYard File input service stops after a while
          Tinie Sluijter Newbie

          It seems that the file input service isn't the problem.

          But a rest service call.

          After some 40 calls the rest call hangs.

          We've added a timeout of 5 seconds for the rest call and get following logging:

           

          10:56:40,609 ERROR [org.switchyard.component.resteasy.OutboundHandler] (Camel (camel-1) thread #2 - file:///home/jboss/jboss-eap-6.1/standalone/input) Unexpected exception composing inbound Message from Outbound: java.lang.RuntimeException: org.apache.http.conn.ConnectionPoolTimeoutException: Timeout waiting for connection
              at org.switchyard.component.resteasy.util.ClientInvoker.invoke(ClientInvoker.java:285) [switchyard-component-resteasy-1.1.0.Final.jar:1.1.0.Final]
              at org.switchyard.component.resteasy.OutboundHandler.handleMessage(OutboundHandler.java:138) [switchyard-component-resteasy-1.1.0.Final.jar:1.1.0.Final]
              at org.switchyard.bus.camel.processors.ProviderProcessor.process(ProviderProcessor.java:29) [switchyard-bus-camel-1.1.0.Final.jar:1.1.0.Final]
              at org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61) [camel-core-2.10.0.jar:2.10.0]
          
          

           

          After this timeout all next rest calls timeout. But why?

          • 2. Re: SwitchYard File input service stops after a while
            Tinie Sluijter Newbie

            We've solved the problem ourselves.

             

            We used a javax.ws.rs.core.Response object to get a response from a rest call.

            We've changed this to a org.jboss.resteasy.client.ClientResponse object and call the response.releaseConnection at the end.