Issue - Passing Base64 string to web-socket in Play framework using scala

76 views
Skip to first unread message

Karthi

unread,
Oct 26, 2015, 8:06:43 AM10/26/15
to play-framework
Hi All,

Framework: Play 2.3
Language: Scala

I have created a web socket communication that accepts a base64 string. The base64 string has been passed as a JSON message.

If I pass the small amount of the input(base64 string), I received it in the server. But If I pass a large amount input(base64 string) in the web socket, I got the below exception.

org.jboss.netty.handler.codec.frame.CorruptedFrameException: Max frame length of 65536 has been exceeded.

 

 at org
.jboss.netty.handler.codec.http.websocketx.WebSocket08FrameDecoder.protocolViolation(WebSocket08FrameDecoder.java:381)

 at org
.jboss.netty.handler.codec.http.websocketx.WebSocket08FrameDecoder.decode(WebSocket08FrameDecoder.java:242)

 at org
.jboss.netty.handler.codec.http.websocketx.WebSocket08FrameDecoder.decode(WebSocket08FrameDecoder.java:71)

 at org
.jboss.netty.handler.codec.replay.ReplayingDecoder.callDecode(ReplayingDecoder.java:500)

 at org
.jboss.netty.handler.codec.replay.ReplayingDecoder.messageReceived(ReplayingDecoder.java:435)

 at org
.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)

 at org
.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)

 at org
.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:559)

 at org
.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268)

 at org
.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255)

 at org
.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88)

 at org
.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:108)

 at org
.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:337)

 at org
.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89)

 at org
.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)

 at org
.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)

 at org
.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)

 at java
.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

 at java
.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

 at java
.lang.Thread.run(Thread.java:745)



I have searched in the google regarding this issue. But I didn't get any solution to fix it.


Did anyone face this issue already? 

How do I fix this issue?


Note: 


I got the similar issue in the HTTP post call already. But I fixed the issue by executing the below command. But it is not working for web socket.


SBT_OPTS="-Xms1024m -Xmx3084m -XX:MaxPermSize=1024m -Dhttp.netty.maxInitialLineLength=2621440"



Evan Lowry

unread,
Oct 30, 2015, 8:12:57 AM10/30/15
to play-fr...@googlegroups.com

--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to play-framewor...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/play-framework/3821feb5-37ef-43bb-a8d1-fabbdc4ff5c5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



Reply all
Reply to author
Forward
0 new messages