Workspace Streaming

 View Only

How to debug out of memory Java issues with SWS  

Jan 27, 2016 01:29 PM

Oracle provides Java Mission Control (whitepaper here), a toolset as part of its JDK that can be used to capture “in-flight” data while the JVM is running. gathering and analyzing this “pre-crash” data using the flight recorder would be a good starting point to help assist us in determining why the JVM is constantly running out of memory.

 

Note: Java Mission Control (JMC) and the Java Flight Recorder can connect to the JVM remotely, but that requires additional configuration and could expose the customer’s data to risk if not secured properly. Our recommendation is to run JMC in a secure environment, locally on the affected server.

 

Pre-requisites and setup instructions:

 

  1. Download and install the latest Java Development Kit from Oracle’s website
  2. Stop the Streamlet Engine (or Data Access Component)
  3. Edit the settings in this file (see notes at the end of this article)
    1. C:\Symantec\Workspace Streaming\Server\common\jboss\bin\appstream.conf.bat
  4. Restart the STE/DA service with debugging-mode enabled
    1. C:\Symantec\Workspace Streaming\Server\streamletEngine\bin\runStreamletEngine.cmd

120px_jvm1.png

4. Collecting in-flight data using Java Mission Control (JMC) and the Flight Recorder

  1. C:\Program Files (x86)\Java\jdk1.8.0_71\bin\jmc.exe
  2. Use the link at the bottom of the window to begin “Click here to start using Oracle Java Mission Control”

jvm2.png

c. Expand the node for the Streamlet Engine, then right click on Flight Recorder and click Start Flight Recording….

jvm3.png

d. Select a filename/location, enter a recording time, and then for Event settings, select “Continuous – on server”

jvm4.png

e.  There are additional settings that may be configured, but we will start with the defaults; click Finish to begin recording.

jvm5.png

f.  Java Mission Control will automatically open the recording when the capture has completed. At this point you may close the JMC application and then compress the data and upload/attach it to the case.

5.  In the command prompt window that opened from step 4 above, press ctrl-c to terminate the debug batch file and then restart the STE service normally.

NOTE: referenced from  step 3 above:

C:\Symantec\Workspace Streaming\Server\common\jboss\bin\appstream.conf.bat

Find the memory allocation pool parameters below in the appstream.conf.bat and then add the line that follows.

rem # JVM memory allocation pool parameters - modify as appropriate.

set "JAVA_OPTS=-Xms64M -Xmx512M -XX:MaxPermSize=256M"

rem # ADD THE LINE BELOW TO ENABLE FLIGHT RECORDING

set "JAVA_OPTS=%JAVA_OPTS% -XX:+UnlockCommercialFeatures -XX:+FlightRecorder -XX:+UnlockDiagnosticVMOptions -XX:+DebugNonSafepoints"

Statistics
0 Favorited
0 Views
0 Files
0 Shares
0 Downloads

Tags and Keywords

Related Entries and Links

No Related Resource entered.