我一直在服务器日志中看到下面的警告和堆栈跟踪,并且想知道出了什么问题以及如何修复它。我检查了推送-000183号,但它只说“消息通道上发生了通信错误”。
2016-04-20 13:37:42.452|WARN|Diffusion: InboundThreadPool Thread_1|PUSH-000183|Message channel error: 'NIOBufferedChannel@571714020[connected local=/10.96.130.21:8070 remote=/10.96.1.36:24832] : Closed(UNEXPECTED_ERROR) ServerInboundTask@542477fd HTTPConnectionHandler@2641ae33[partial request - more expected]: handler left no space in buffer ' caused by 'ServerInboundTask@542477fd HTTPConnectionHandler@2641ae33[partial request - more expected]: handler left no space in buffer'.|com.pushtechnology.diffusion.io.message.MessageChannelException
com.pushtechnology.diffusion.io.message.MessageChannelException: ServerInboundTask@542477fd HTTPConnectionHandler@2641ae33[partial request - more expected]: handler left no space in buffer
at com.pushtechnology.diffusion.io.nio.NIOBufferedChannel.logClosingException(NIOBufferedChannel.java:647)
at com.pushtechnology.diffusion.io.nio.NIOBufferedChannel.logAndClose(NIOBufferedChannel.java:613)
at com.pushtechnology.diffusion.io.nio.AbstractReadSelector$InboundTask.close(AbstractReadSelector.java:410)
at com.pushtechnology.diffusion.io.nio.AbstractReadSelector$InboundTask.run(AbstractReadSelector.java:351)
at com.pushtechnology.diffusion.threads.FastThreadPool$PoolWorker.run(FastThreadPool.java:783)
at java.lang.Thread.run(Thread.java:744)
Caused by: java.lang.IllegalStateException: ServerInboundTask@542477fd HTTPConnectionHandler@2641ae33[partial request - more expected]: handler left no space in buffer
at com.pushtechnology.diffusion.io.nio.AbstractReadSelector$InboundTask.run(AbstractReadSelector.java:324)这是否仅限于使用XHR连接的客户端,还是websockets也会受到影响?
发布于 2016-04-27 20:04:52
当客户端向服务器发送大于Connectors.xml中配置的输入缓冲区大小的消息时,就会发生这种情况。
它将断开客户端的连接,如果客户端是配置为这样做,客户端可能会重新连接。这种情况可以发生在任何客户机上,而不管传输(XHR、Websockets等)。
您将需要增加Connectors.xml中的输入缓冲区大小,以匹配您期望的最大消息。例如,如果要发送256 K大小的消息,可以使用以下配置:
<socket-conditioning>
<!-- If this value is less than max-message-size defined in
Server.xml, it will be
overwritten by the latter. -->
<input-buffer-size>256k</input-buffer-size>
<!-- Other config... -->
</socket-conditioning>https://stackoverflow.com/questions/36889640
复制相似问题