How to increase the websocket buffer size?

358 views
Skip to first unread message

mathias

unread,
Jul 10, 2018, 6:55:54 PM7/10/18
to vert.x

See the exception:

2018-07-11 00:43:32,022 [1;31mERROR [0;39m [vert.x-eventloop-thread-1] [i.v.c.net.impl.ConnectionBase] - Unhandled exception io.netty.handler.codec.CorruptedFrameException: Max frame length of 65536 has been exceeded.
    at io
.netty.handler.codec.http.websocketx.WebSocket08FrameDecoder.protocolViolation(WebSocket08FrameDecoder.java:412)
    at io
.netty.handler.codec.http.websocketx.WebSocket08FrameDecoder.decode(WebSocket08FrameDecoder.java:277)
    at io
.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:489)
    at io
.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:428)
    at io
.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:265)
    at io
.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
    at io
.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
    at io
.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
    at io
.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1379)
    at io
.netty.handler.ssl.SslHandler.decodeJdkCompatible(SslHandler.java:1158)
    at io
.netty.handler.ssl.SslHandler.decode(SslHandler.java:1193)
    at io
.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:489)
    at io
.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:428)
    at io
.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:265)
    at io
.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
    at io
.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
    at io
.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
    at io
.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1359)
    at io
.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
    at io
.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
    at io
.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:935)
    at io
.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:138)
    at io
.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:645)
    at io
.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:580)
    at io
.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:497)
    at io
.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:459)
    at io
.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:886)
    at io
.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
    at java
.lang.Thread.run(Thread.java:745)

How to increase the max frame length and will the SockJS bridge be able to handle it?

Julien Viet

unread,
Jul 11, 2018, 2:25:08 AM7/11/18
to ve...@googlegroups.com
Hi,

this is available in the HttpServerOptions on the server.

Julien

--
You received this message because you are subscribed to the Google Groups "vert.x" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vertx+un...@googlegroups.com.
Visit this group at https://groups.google.com/group/vertx.
To view this discussion on the web, visit https://groups.google.com/d/msgid/vertx/fc5d2e4f-7898-434d-9371-8acca1f963e5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

mathias

unread,
Jul 11, 2018, 8:14:19 AM7/11/18
to vert.x
Thanks! It works after increasing the frame size.
Reply all
Reply to author
Forward
0 new messages