tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 63931] New: The remote endpoint was in state [TEXT_FULL_WRITING] which is an invalid state
Date Mon, 18 Nov 2019 07:49:20 GMT
https://bz.apache.org/bugzilla/show_bug.cgi?id=63931

            Bug ID: 63931
           Summary: The remote endpoint was in state [TEXT_FULL_WRITING]
                    which is an invalid state
           Product: Tomcat 9
           Version: unspecified
          Hardware: PC
            Status: NEW
          Severity: major
          Priority: P2
         Component: WebSocket
          Assignee: dev@tomcat.apache.org
          Reporter: sauravksingh@eaton.com
  Target Milestone: -----

Given:
RabbitMQ as a incoming streaming message source consumer 
When:
WebScoket subscribe for incoming message to show on UI. It works fine for
initial few moments.
Then: 
The moment incoming streaming message rate goes more than 800messages/sec after
few min started receiving below Exception:

 synchronized (this) {
 if (session.isOpen()) {
                    try {
                        log.info("Sending message to client session ID : " +
session.getId());
                        ((StandardWebSocketSession)
session).getNativeSession().getBasicRemote().sendText(message);
                    } catch (Exception e) {
                        log.error("Encountered an error sending to client!",
e);
                    }
                }
}

we also used StampedLock at method level to socket session management.

------------
2019-11-18T13:06:32,084 [tainer#0-1] co.ea.ex.no.tr.we.WebSocketServerHandler
ERROR: o.tr.we.WebSocketServerHandler(dToSession:  520) Encountered an error
sending to client!
java.lang.IllegalStateException: The remote endpoint was in state
[TEXT_FULL_WRITING] which is an invalid state for called method
        at
org.apache.tomcat.websocket.WsRemoteEndpointImplBase$StateMachine.checkState(WsRemoteEndpointImplBase.java:1229)
        at
org.apache.tomcat.websocket.WsRemoteEndpointImplBase$StateMachine.textStart(WsRemoteEndpointImplBase.java:1191)
        at
org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendString(WsRemoteEndpointImplBase.java:190)
        at
org.apache.tomcat.websocket.WsRemoteEndpointBasic.sendText(WsRemoteEndpointBasic.java:37)
        at
com.eaton.export.notifications.transport.websocket.WebSocketServerHandler.sendToSession(WebSocketServerHandler.java:518)

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message