PUSH-000183:处理程序在缓冲区中没有留下 space

PUSH-000183: handler left no space in buffer

我一直在服务器日志中看到以下警告和堆栈跟踪,想知道出了什么问题以及如何解决。我检查了 the designation PUSH-000183,但它只显示 "A communication error has occurred on a message channel."

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 是否也会受到影响?

当客户端向更大的服务器发送消息时会发生这种情况 比 Connectors.xml.

中配置的输入缓冲区大小

它将断开客户端连接,如果已配置 ,则客户端可能会重新连接 这样做。无论传输方式如何,任何客户端都可能发生这种情况 (XHR、Websockets 等)。

您需要将 Connectors.xml 中的输入缓冲区大小增加到 匹配您期望的最大消息。例如,如果你是 发送最大 256K 的消息你可以使用下面的 配置:

<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>