users@glassfish.java.net

Re: SSL Buffer exceptions under mild load

From: Oleksiy Stashok <oleksiy.stashok_at_oracle.com>
Date: Mon, 21 Nov 2011 11:27:47 +0100

Ha Darren,

can you pls. attach simple app. (+sources) we can deploy and stress test
to see the issue?

Thanks.

WBR,
Alexey.

On 11/18/2011 01:25 PM, forums_at_java.net wrote:
> Hi,
>
> Having major issues with glassfish 3.1.1 which I cannot resolve.
>
> I am using grizzly comet for ajax long polling (no iframe streaming).
>
> As soon as the load is increased (10 users, 30transactions/sec) it
> throws SSL
> byte buffer exceptions. ie:
>
> [#|2011-11-18T12:11:08.372+0000|SEVERE|glassfish3.1.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=23;_ThreadName=Thread-2;|java.lang.IllegalArgumentException
>
>
> at java.nio.Buffer.position(Buffer.java:218)
>
> at sun.nio.ch.IOUtil.write(IOUtil.java:46)
>
> at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:334)
>
> at com.sun.grizzly.util.OutputWriter.flushChannel(OutputWriter.java:108)
>
> at com.sun.grizzly.util.OutputWriter.flushChannel(OutputWriter.java:76)
>
> at
> com.sun.grizzly.util.SSLOutputWriter.flushChannel(SSLOutputWriter.java:102)
>
>
> at
> com.sun.grizzly.ssl.SSLAsyncOutputBuffer.flushChannel(SSLAsyncOutputBuffer.java:90)
>
>
> at
> com.sun.grizzly.http.SocketChannelOutputBuffer.flushBuffer(SocketChannelOutputBuffer.java:398)
>
>
> at
> com.sun.grizzly.http.SocketChannelOutputBuffer.endRequest(SocketChannelOutputBuffer.java:389)
>
>
> at com.sun.grizzly.http.ProcessorTask.action(ProcessorTask.java:1090)
>
> at com.sun.grizzly.ssl.SSLProcessorTask.action(SSLProcessorTask.java:164)
>
> at com.sun.grizzly.tcp.Response.action(Response.java:268)
>
> at com.sun.grizzly.tcp.Response.finish(Response.java:412)
>
> at
> org.apache.catalina.connector.OutputBuffer.close(OutputBuffer.java:341)
>
> at
> org.apache.catalina.connector.CoyoteWriter.close(CoyoteWriter.java:172)
>
> at
> com.innovez.fqe.dataHandler.LongPollCometHandler.processEvent(LongPollCometHandler.java:99)
>
>
> at
> com.innovez.fqe.dataHandler.LongPollCometHandler.onEvent(LongPollCometHandler.java:62)
>
>
> at
> com.sun.grizzly.comet.DefaultNotificationHandler.notify0(DefaultNotificationHandler.java:191)
>
>
> at
> com.sun.grizzly.comet.DefaultNotificationHandler$2.run(DefaultNotificationHandler.java:157)
>
>
> at
> com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
>
>
> at
> com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
>
>
> at java.lang.Thread.run(Thread.java:662)
>
> Also this one:
>
> [#|2011-11-18T11:47:54.692+0000|SEVERE|glassfish3.1.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=26;_ThreadName=Thread-2;|java.nio.BufferOverflowException
>
>
> at java.nio.DirectByteBuffer.put(DirectByteBuffer.java:316)
>
> at java.nio.DirectByteBuffer.put(DirectByteBuffer.java:295)
>
> at sun.nio.ch.IOUtil.write(IOUtil.java:38)
>
> at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:334)
>
> at com.sun.grizzly.util.OutputWriter.flushChannel(OutputWriter.java:108)
>
> at com.sun.grizzly.util.OutputWriter.flushChannel(OutputWriter.java:76)
>
> at
> com.sun.grizzly.util.SSLOutputWriter.flushChannel(SSLOutputWriter.java:102)
>
>
> at
> com.sun.grizzly.ssl.SSLAsyncOutputBuffer.flushChannel(SSLAsyncOutputBuffer.java:90)
>
>
> at
> com.sun.grizzly.http.SocketChannelOutputBuffer.flushBuffer(SocketChannelOutputBuffer.java:398)
>
>
> at
> com.sun.grizzly.http.SocketChannelOutputBuffer.endRequest(SocketChannelOutputBuffer.java:389)
>
>
> at com.sun.grizzly.http.ProcessorTask.action(ProcessorTask.java:1090)
>
> at com.sun.grizzly.ssl.SSLProcessorTask.action(SSLProcessorTask.java:164)
>
> at com.sun.grizzly.tcp.Response.action(Response.java:268)
>
> at com.sun.grizzly.tcp.Response.finish(Response.java:412)
>
> at
> org.apache.catalina.connector.OutputBuffer.close(OutputBuffer.java:341)
>
> at
> org.apache.catalina.connector.CoyoteWriter.close(CoyoteWriter.java:172)
>
> at
> com.innovez.fqe.dataHandler.LongPollCometHandler.processEvent(LongPollCometHandler.java:99)
>
>
> at
> com.innovez.fqe.dataHandler.LongPollCometHandler.onEvent(LongPollCometHandler.java:62)
>
>
> at
> com.sun.grizzly.comet.DefaultNotificationHandler.notify0(DefaultNotificationHandler.java:191)
>
>
> at
> com.sun.grizzly.comet.DefaultNotificationHandler$2.run(DefaultNotificationHandler.java:157)
>
>
> at
> com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
>
>
> at
> com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
>
>
> at java.lang.Thread.run(Thread.java:662)
>
> |#]
>
> Any ideas?
>
> Thanks
>
> Darren
>
>
> --
>
> [Message sent by forum member 'dazzoh']
>
> View Post: http://forums.java.net/node/865452
>
>