[Paraview] ParaviewWeb4 Jetty Session manager - Out of memory error
Bogdan Daqui Herrera
bdaqui at simscale.de
Tue Nov 26 06:38:49 EST 2013
Hi Sebastian,
Understood, thanks for the kind and quick reply. As you mentioned, we
will probably have to do some rework of this part of the session manager.
Best regards,
Bogdan
On 21.11.2013 21:58, Sebastien Jourdain wrote:
> The issue is related to the web socket proxy section which was there to
> show the feasibility not the robustness.
> For that you rather use apache 2.4+.
>
>
> On Thu, Nov 21, 2013 at 9:52 AM, Bogdan Daqui Herrera
> <bdaqui at simscale.de <mailto:bdaqui at simscale.de>> wrote:
>
> Hello all,
>
> Thanks for the useful answers to my previous questions.
>
> I am encountering a problem with the Jetty Session Manager and the fact
> that the java process runs out of memory, under what could be a
> memory leak.
>
> 1. Description:
> * The Problem: The (java) Jetty session manager runs out of memory after
> establishing multiple sessions either sequentially or simultaneously.
> For example the error could manifest itself after 30 paraview sessions
> being started and terminated. The stacktrace appended at the end of the
> e-mail:
>
> * Repeatability: always. It happens much sooner on jvms on 32-bit
> machines than on 64-bit ones.
>
> * My changes to the Session Manager: In
> SessionManager/src/main/java/com/kitware/paraviewweb/external/SimpleWebSocketProxyManager.java:
>
> DEFAULT_MAX_MESSAGE_SIZE -> From 2 to 4 MB (Increased the websocket
> message size)
> DEFAULT_FACTORY_BUFFER_SIZE -> From 1 to 2 MB
>
> * session manager started with:
> java -jar SessionManager.jar default-config.properties
>
> Using the -Xms and -Xmx options to increase allocated memory when
> launching the process only delays the final error for a little longer,
> as sooner or later it shows up.
>
> 2. Questions
> -Do you perhaps know how this issue could be addressed, or any advice on
> how to mitigate it and where to look for a possible memory leak?
>
> -From your experience with the current implementation of the Session
> Manager, what would be the current practical limit on the number of
> concurrent (I have specified a maximum of 80 in the config file) and
> sequential sessions?
>
> 3. Error Stacktrace
> java.lang.OutOfMemoryError: Java heap space
> at
> org.eclipse.jetty.io.ByteArrayBuffer.<init>(ByteArrayBuffer.java:38)
> at
> org.eclipse.jetty.io.nio.IndirectNIOBuffer.<init>(IndirectNIOBuffer.java:32)
> at
> org.eclipse.jetty.io.AbstractBuffers.newBuffer(AbstractBuffers.java:94)
> at
> org.eclipse.jetty.io.ThreadLocalBuffers.getBuffer(ThreadLocalBuffers.java:64)
> at
> org.eclipse.jetty.websocket.WebSocketBuffers.getBuffer(WebSocketBuffers.java:48)
> at
> org.eclipse.jetty.websocket.WebSocketParserRFC6455.parseNext(WebSocketParserRFC6455.java:132)
> at
> org.eclipse.jetty.websocket.WebSocketConnectionRFC6455.handle(WebSocketConnectionRFC6455.java:225)
> at
> org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:628)
> at
> org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
> at
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
> at
> org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
> at java.lang.Thread.run(Thread.java:679)
> 2013-11-21 14:58:15.030:WARN:oeji.nio:
> java.lang.OutOfMemoryError: Java heap space
> at
> org.eclipse.jetty.io.ByteArrayBuffer.<init>(ByteArrayBuffer.java:38)
> at
> org.eclipse.jetty.io.nio.IndirectNIOBuffer.<init>(IndirectNIOBuffer.java:32)
> at
> org.eclipse.jetty.io.AbstractBuffers.newBuffer(AbstractBuffers.java:94)
> at
> org.eclipse.jetty.io.ThreadLocalBuffers.getBuffer(ThreadLocalBuffers.java:64)
> at
> org.eclipse.jetty.websocket.WebSocketBuffers.getBuffer(WebSocketBuffers.java:48)
> at
> org.eclipse.jetty.websocket.WebSocketGeneratorRFC6455.addFrame(WebSocketGeneratorRFC6455.java:77)
> at
> org.eclipse.jetty.websocket.WebSocketConnectionRFC6455.closeOut(WebSocketConnectionRFC6455.java:382)
> at
> org.eclipse.jetty.websocket.WebSocketConnectionRFC6455$WSFrameConnection.close(WebSocketConnectionRFC6455.java:489)
> at
> com.kitware.paraviewweb.websocket.WebSocketForwarder.onClose(WebSocketForwarder.java:64)
> at
> org.eclipse.jetty.websocket.WebSocketConnectionRFC6455.closeOut(WebSocketConnectionRFC6455.java:358)
> at
> org.eclipse.jetty.websocket.WebSocketConnectionRFC6455$WSFrameConnection.close(WebSocketConnectionRFC6455.java:489)
> at
> com.kitware.paraviewweb.websocket.WebSocketForwarder.onClose(WebSocketForwarder.java:64)
> at
> org.eclipse.jetty.websocket.WebSocketConnectionRFC6455.onClose(WebSocketConnectionRFC6455.java:302)
> at
> org.eclipse.jetty.websocket.WebSocketClientFactory$WebSocketClientConnection.onClose(WebSocketClientFactory.java:570)
> at
> org.eclipse.jetty.websocket.WebSocketClientFactory$WebSocketClientSelector.endPointClosed(WebSocketClientFactory.java:330)
> at
> org.eclipse.jetty.io.nio.SelectorManager$SelectSet.destroyEndPoint(SelectorManager.java:853)
> at
> org.eclipse.jetty.io.nio.SelectChannelEndPoint.doUpdateKey(SelectChannelEndPoint.java:607)
> at
> org.eclipse.jetty.io.nio.SelectorManager$SelectSet.doSelect(SelectorManager.java:468)
> at
> org.eclipse.jetty.io.nio.SelectorManager$1.run(SelectorManager.java:290)
> at
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
> at
> org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
> at java.lang.Thread.run(Thread.java:679)
>
>
>
> Thanks in advance for your replies.
>
> Kind regards,
> Bogdan Daqui
>
> --
> Bogdan Daqui
> Software Development
>
> SimScale GmbH
> Lichtenbergstraße 8
> 85748 Garching bei München
>
> Phone: +49 (0)89 3398 4078
> Email: bdaqui at simscale.de <mailto:bdaqui at simscale.de>
>
> Amtsgericht München, HRB 201813
> Geschäftsführer: Vincenz Dölle & David Heiny
>
> http://www.simscale.der
> _______________________________________________
> Powered by www.kitware.com <http://www.kitware.com>
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ParaView Wiki at:
> http://paraview.org/Wiki/ParaView
>
> Follow this link to subscribe/unsubscribe:
> http://www.paraview.org/mailman/listinfo/paraview
>
>
More information about the ParaView
mailing list