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