Setting the number of maximum concurrent WebSocket

335 views
Skip to first unread message

Matthieu Ravey

unread,
Sep 12, 2012, 8:07:13 AM9/12/12
to play-fr...@googlegroups.com
Hi,

My app is using websockets and when I tried to deploy it and have more than 4 concurrent connections I got those exceptions :

java.io.IOException: Broken pipe
at sun.nio.ch.FileDispatcher.write0(Native Method)
at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:47)
at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:122)
at sun.nio.ch.IOUtil.write(IOUtil.java:78)
at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:352)
at org.jboss.netty.channel.socket.nio.SocketSendBufferPool$PooledSendBuffer.transferTo(SocketSendBufferPool.java:242)
at org.jboss.netty.channel.socket.nio.AbstractNioWorker.write0(AbstractNioWorker.java:477)
at org.jboss.netty.channel.socket.nio.AbstractNioWorker.writeFromTaskLoop(AbstractNioWorker.java:432)
at org.jboss.netty.channel.socket.nio.AbstractNioChannel$WriteTask.run(AbstractNioChannel.java:366)
at org.jboss.netty.channel.socket.nio.AbstractNioWorker.processWriteTaskQueue(AbstractNioWorker.java:350)
at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:246)
at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:35)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:679)
java.nio.channels.ClosedChannelException
at org.jboss.netty.channel.socket.nio.AbstractNioWorker.cleanUpWriteBuffer(AbstractNioWorker.java:662)
at org.jboss.netty.channel.socket.nio.AbstractNioWorker.close(AbstractNioWorker.java:630)
at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:98)
at org.jboss.netty.channel.socket.nio.AbstractNioWorker.processSelectedKeys(AbstractNioWorker.java:373)
at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:247)
at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:35)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:679)

I think there is something to set in the configuration to handle more concurrent connections, but I did not find it in the documentation. 

Thank you for your help.

Matthieu

Matthieu Ravey

unread,
Sep 17, 2012, 8:46:21 AM9/17/12
to play-fr...@googlegroups.com
Any help ?

Matthieu

Guillaume Bort

unread,
Sep 17, 2012, 10:59:30 AM9/17/12
to play-fr...@googlegroups.com
There is no limit. Apart if your websocket implementation is blocking
so you will quickly block all threads and new connections will be
rejected.

On Mon, Sep 17, 2012 at 2:46 PM, Matthieu Ravey <matt...@wearecloud.com> wrote:
> Any help ?
>
> Matthieu
>
> --
> You received this message because you are subscribed to the Google Groups
> "play-framework" group.
> To post to this group, send email to play-fr...@googlegroups.com.
> To unsubscribe from this group, send email to
> play-framewor...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/play-framework?hl=en.



--
Guillaume Bort, http://guillaume.bort.fr
Reply all
Reply to author
Forward
0 new messages