@
zhongpingjing 我查看了出现问题时的 jstack log ,我发现线程池全部都是这种 Waiting on condition ,全在等待条件,就是不释放。
大概率是你说的这种原因。
我猜测应该是 websocket 发送消息时,浏览器因为某种原因,导致 websocket 认为应该等待后再继续发送消息。
==========
hread Name
msg-thread2-7
State
Waiting on condition
Java Stack
at sun.misc.Unsafe.park(Native Method)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
at org.eclipse.jetty.util.SharedBlockingCallback$Blocker.block(SharedBlockingCallback.java:219)
at org.eclipse.jetty.websocket.common.BlockingWriteCallback$WriteBlocker.block(BlockingWriteCallback.java:90)
at org.eclipse.jetty.websocket.common.WebSocketRemoteEndpoint.blockingWrite(WebSocketRemoteEndpoint.java:107)
at org.eclipse.jetty.websocket.common.WebSocketRemoteEndpoint.sendString(WebSocketRemoteEndpoint.java:385)
at org.eclipse.jetty.websocket.jsr356.JsrBasicRemote.sendText(JsrBasicRemote.java:108)
....