2 Replies Latest reply on Dec 3, 2014 5:17 AM by gustavsinder

    HTTP responses time out

    gustavsinder

      Hi,

       

      We've got an issue with some responses never being returned back to the HTTP client, making it time out.

      It seems to depend on the length of the response returned from transformCanonicalToResponse().

      A payload of ~10000 characters is returned ok but ~30000 characters are never returned.

      It's reproducible every time and no errors are logged.

       

      See route below, the log is written every time with the full correct payload.

       

      Fuse version 6.1.0

      <route id="InboundREST">
          <!-- RESTlet that receives XML files -->
          <from uri="restlet:http://localhost:{{listeningPort}}/{{listeningAdress}}?restletMethods=POST" />
      
          <!-- Validate the XML -->
          <to uri="validator:{{xsdLocation}}" />
      
          <!-- Transform XML to canonical -->
          <bean ref="transformToCanonical" method="transformRequestToCanonical" />
      
          <!-- Get data from backend -->
          <to uri="{{backend}}?timeout=300000" />
      
          <!-- Transform canonical to XML -->
          <bean ref="transformFromCanonical" method="transformCanonicalToResponse" />
      
          <convertBodyTo type="java.lang.String" />
      
          <to uri="log:foo?showAll=true&amp;maxChars=100000" />
      </route>
      

       

       

      Thanks!

        • 1. Re: HTTP responses time out
          gustavsinder

          After using Wireshark we found that Fuse actually sends data back but just stops sending in the middle of the payload. No HTTP response status code or anything.

          When looking at the context information in Hawtio, Camel considers the transaction completed and not in-flight.

           

          To clarify, {{backend}} in the config resolves to vm:<nameofbackendcontext> that handles the database stuff.

           

          Any ideas? Thanks

          • 2. Re: HTTP responses time out
            gustavsinder

            Stopped trying to use the Restlet component and switched to Jetty instead. Not sure about the difference in functionality but it works just fine now.