1 Reply Latest reply on May 11, 2017 2:40 PM by Max Barkley

    Errai Bus starts looping on client side

    Saif Rehman Newbie


      We have been using Errai 3.2.5 Final for our Web Application. We have seen strange behavior of Errai Bus on client side (Browser Console) while using the application where Errai bus sending a request every 100-200 ms and getting an empty HTTP 200 OK response from the server and then requesting again. (During all this , the application is in idle state and not being used)  And this keeps happening until we navigate away from the Page or refresh the page. I have attached a Screen shot for the reference.



      A request is being made almost every 80 ms and getting a response 200 in above snap.

      This starts happening while using the application (in almost all of the application pages). There are no specific steps to reproduce this issue but we see it happening quite frequently when the application is in idle state


      Following is ErraiService.properties :























      can you please help us to determine the real issue here ?

        • 1. Re: Errai Bus starts looping on client side
          Max Barkley Expert

          Hi Saif,


          This looks like a potential bug in the SSE negotiation logic. URLs of the form "in.<client-id>.erraiBus" are used for SSE connections (where a single SSE connection is meant to be used to deliver all messages from the server bus to a particular client bus).


          But SSE is not supported by the StandardAsyncServlet. It should be the case that when the bus connection is negotiated, the client is informed that SSE is not enabled and falls back to long-polling, but evidently something has gone wrong where the client attempts an SSE connection and continually attempts to reopen it.


          I encourage you open a JIRA issue with more details (including browser logs of the entire bus connection in a failing case). In the mean time, here are some workarounds you can try:


          • Use the DefaultBlockingServlet (which supports SSE)
          • Explicitly disable SSE support in your ErraiService.properties with the property: "errai.bus.enable_sse_support=false"