Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-4817

Wildfly 10 (& 9) websocket producing massive logs on websocket error (async send only)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 7.0.1.CR1, 7.0.1.GA
    • 7.0.0.GA
    • Undertow
    • None
    • User Experience
    • EAP 7.0.1

    Description

      I have a fairly simple WebSocket client that sends a series of messages to a remote socket endpoint (JS AngularJS app) in JSON:

      ByteBuffer buf = ByteBuffer.wrap(bout.toByteArray());
      session.getAsyncRemote().sendBinary(buf);

      The system will run for several hours and every once in a while this messages starts filling up the logs in Wildfly:

      2016-04-26 17:42:43,072 ERROR [org.xnio.listener] (default I/O-8) XNIO001008: A channel exception handler threw an exception: java.lang.IllegalStateExcep$
      at io.undertow.websockets.jsr.SendResultFuture.onError(SendResultFuture.java:55)
      at io.undertow.websockets.core.WebSockets$2.handleException(WebSockets.java:426)
      at io.undertow.websockets.core.WebSockets$2.handleException(WebSockets.java:422)
      at org.xnio.ChannelListeners.invokeChannelExceptionHandler(ChannelListeners.java:126)
      at org.xnio.ChannelListeners$14.handleEvent(ChannelListeners.java:416)
      at org.xnio.ChannelListeners$14.handleEvent(ChannelListeners.java:409)
      at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
      at org.xnio.ChannelListeners$4.run(ChannelListeners.java:147)
      at org.xnio.nio.WorkerThread.safeRun(WorkerThread.java:580)
      at org.xnio.nio.WorkerThread.run(WorkerThread.java:464)

      I think the futures are not being canceled when the socket is closed (for example if the remote endpoint goes away).

      Reviewed this code:

      https://github.com/undertow-io/undertow/blob/master/websockets-jsr/src/main/java/io/undertow/websockets/jsr/SendResultFuture.java

      Line 55 is happening repeatedly and causing an error level log in Wildfly.

      I am happy to share my websocket code if it will help you. Let me know.

      I have tried a few things to make this go away. The logs being filled by this error cause my system to fail for users a bit because of the CPU resources.

      Attachments

        Issue Links

          Activity

            People

              sdouglas1@redhat.com Stuart Douglas
              timothyheider Timothy Heider (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: